|
@@ -148,8 +148,9 @@ public class GatherTask implements Runnable{
|
|
if(pre==null||pre==0) {
|
|
if(pre==null||pre==0) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- boolean isTimeout= ((new Date()).getTime()-pre.longValue())>(cmdTimeout-5000);
|
|
|
|
|
|
+ boolean isTimeout= ((new Date()).getTime()-pre.longValue())>(cmdTimeout-1000);
|
|
|
|
|
|
|
|
+ /**
|
|
if(!isTimeout) {
|
|
if(!isTimeout) {
|
|
timeoutCount=0; //有一次不超时就清空超时次数
|
|
timeoutCount=0; //有一次不超时就清空超时次数
|
|
}
|
|
}
|
|
@@ -158,6 +159,8 @@ public class GatherTask implements Runnable{
|
|
}
|
|
}
|
|
|
|
|
|
return timeoutCount>1; //多次超时(2次及以上)需要关闭通道,等待重连
|
|
return timeoutCount>1; //多次超时(2次及以上)需要关闭通道,等待重连
|
|
|
|
+ **/
|
|
|
|
|
|
|
|
+ return isTimeout;
|
|
}
|
|
}
|
|
}
|
|
}
|