diff --git a/pom.xml b/pom.xml
index 20898c0..55d5872 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.meteor
AifadianPay
- 3.2-SNAPSHOT
+ 3.3-SNAPSHOT
jar
AifadianPay
diff --git a/src/main/java/com/meteor/aifadianpay/afdian/AfadianApi.java b/src/main/java/com/meteor/aifadianpay/afdian/AfadianApi.java
index 8cd9878..d18b318 100644
--- a/src/main/java/com/meteor/aifadianpay/afdian/AfadianApi.java
+++ b/src/main/java/com/meteor/aifadianpay/afdian/AfadianApi.java
@@ -61,9 +61,11 @@ public QueryOrderResponse toOrders(PackHttpResponse packHttpResponse){
if(AifadianPay.debug){
AifadianPay.INSTANCE.getLogger().info("返回状态码: "+queryOrderResponse.getEc());
}
+ packHttpResponse.close();
return queryOrderResponse;
}
+
/**
* 异步请求订单
* @param afdOrderReq
diff --git a/src/main/java/com/meteor/aifadianpay/afdian/handle/HandlerQueryOrdersResponse.java b/src/main/java/com/meteor/aifadianpay/afdian/handle/HandlerQueryOrdersResponse.java
index f383286..83c6c59 100644
--- a/src/main/java/com/meteor/aifadianpay/afdian/handle/HandlerQueryOrdersResponse.java
+++ b/src/main/java/com/meteor/aifadianpay/afdian/handle/HandlerQueryOrdersResponse.java
@@ -4,8 +4,6 @@
import com.meteor.aifadianpay.afdian.AfadianApi;
import com.meteor.aifadianpay.afdian.response.Orders;
import com.meteor.aifadianpay.afdian.response.QueryOrderResponse;
-import com.meteor.aifadianpay.httputil.callback.AsyncHttpResponseCallBack;
-import com.meteor.aifadianpay.httputil.response.PackHttpResponse;
import com.meteor.aifadianpay.storage.IStorage;
public class HandlerQueryOrdersResponse{
diff --git a/src/main/java/com/meteor/aifadianpay/httputil/response/PackHttpResponse.java b/src/main/java/com/meteor/aifadianpay/httputil/response/PackHttpResponse.java
index 5943846..4370cac 100644
--- a/src/main/java/com/meteor/aifadianpay/httputil/response/PackHttpResponse.java
+++ b/src/main/java/com/meteor/aifadianpay/httputil/response/PackHttpResponse.java
@@ -32,8 +32,12 @@ public boolean isSuccess(){
关闭实体输入流
*/
@Override
- public void close() throws Exception {
- httpResponse.getEntity().getContent().close();
+ public void close() {
+ try {
+ httpResponse.getEntity().getContent().close();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
}
/**
diff --git a/src/main/java/com/meteor/aifadianpay/util/BaseConfig.java b/src/main/java/com/meteor/aifadianpay/util/BaseConfig.java
index 5c49a8e..2c10863 100644
--- a/src/main/java/com/meteor/aifadianpay/util/BaseConfig.java
+++ b/src/main/java/com/meteor/aifadianpay/util/BaseConfig.java
@@ -100,7 +100,7 @@ public void reload(){
}
public int getHttpTimeout(){
- return plugin.getConfig().getInt("timeout",8)*1000;
+ return plugin.getConfig().getInt("timeout",30)*1000;
}
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 6c19fa8..04346e5 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -6,12 +6,13 @@ token: ''
# 数据库信息 (推荐启用)
mysql-info:
ip: '127.0.0.1'
+ # 是否启用
enable: false
port: 3306
- param: 'useSsl=false'
+ param: 'useSSL=false&serverTimezone=Asia/Shanghai'
user: 'root'
- password: 'mmeteor233'
- database: 'minecraft'
+ password: '不告诉你'
+ database: 'server01'
validSql: 'show databases'
# 该选项控制多久开始查询一次订单
@@ -24,4 +25,4 @@ query-cron: '0 0/2 * * * ?'
debug: false
# 网络请求超时时间 (秒)
-timeout: 10
\ No newline at end of file
+timeout: 30
\ No newline at end of file