diff --git a/pom.xml b/pom.xml
index c6d9733..9b1adb7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
UTF-8
UTF-8
- 1.0.6
+ 1.0.9
4.1.3
1.2.47
1.7.25
diff --git a/src/main/java/com/thankjava/wqq/core/event/MsgPollEvent.java b/src/main/java/com/thankjava/wqq/core/event/MsgPollEvent.java
index 8aadcc5..a348e06 100644
--- a/src/main/java/com/thankjava/wqq/core/event/MsgPollEvent.java
+++ b/src/main/java/com/thankjava/wqq/core/event/MsgPollEvent.java
@@ -88,7 +88,7 @@ private boolean doExceptionCheck(PullMsgStatus pullMsgStatus) {
// 重置监控数据
session.resetMonitoringData();
try {
- Method method = ReflectHelper.getMethod(loginAction, "beginLogin");
+ Method method = ReflectHelper.getMethod(LoginAction.class, "beginLogin");
int retryTimes = ConfigParams.AUTO_RE_LOGIN_RETRY_MAX_TIME;
while (retryTimes > 0) {
boolean flag = (boolean) ReflectHelper.invokeMethod(loginAction, method);
diff --git a/src/main/java/com/thankjava/wqq/core/request/aop/DoRequest.java b/src/main/java/com/thankjava/wqq/core/request/aop/DoRequest.java
index 554bbcc..d8e51e5 100644
--- a/src/main/java/com/thankjava/wqq/core/request/aop/DoRequest.java
+++ b/src/main/java/com/thankjava/wqq/core/request/aop/DoRequest.java
@@ -16,7 +16,7 @@
public class DoRequest {
private static final String proxyMethodName = "buildRequestParams";
-
+
private static Logger logger = LoggerFactory.getLogger(DoRequest.class);
private static AsyncHttpClient asyncHttpClient = BaseHttpService.asyncHttpClient;
@@ -32,28 +32,28 @@ public AopParam doRequest(AopParam aopParam) {
// 执行buildRequestParams 得到请求的参数体
Object proxyInstance = aopParam.getProxyInstance();
- Method method = ReflectHelper.getMethod(proxyInstance, proxyMethodName);
+ Method method = ReflectHelper.getMethod(proxyInstance.getClass(), proxyMethodName);
AsyncRequest asyncRequest = (AsyncRequest) ReflectHelper.invokeMethod(proxyInstance, method);
-
+
if (listener != null) {
// 如果传递了listener 则通过listener的方式回调返回
try {
listener.onListener(new ActionListener((asyncHttpClient.syncRequestWithSession(asyncRequest))));
} catch (Throwable e) {
- logger.error("http request error", e);
+ logger.error("http request error", e);
listener.onListener(new ActionListener());
}
} else {
- try {
+ try {
aopParam.setResult(asyncHttpClient.syncRequestWithSession(asyncRequest));
- }catch (Throwable e) {
- aopParam.setResult(null);
- logger.error("http request error", e);
- }
+ } catch (Throwable e) {
+ aopParam.setResult(null);
+ logger.error("http request error", e);
+ }
}
-
+
// 通过普通的方式返回结果
return aopParam;
}