|
|
@@ -205,7 +205,6 @@ function Connect() {
|
|
205
|
205
|
sendType="close"; //JSON.stringify(data)
|
|
206
|
206
|
mesCont=JSON.stringify(evt);
|
|
207
|
207
|
debuggerLog();
|
|
208
|
|
- alert("连接关闭");
|
|
209
|
208
|
if(cls == 0) {
|
|
210
|
209
|
cls = 1;
|
|
211
|
210
|
//console.log("连接关闭!");
|
|
|
@@ -364,7 +363,7 @@ function Send() {
|
|
364
|
363
|
}
|
|
365
|
364
|
//心跳检测
|
|
366
|
365
|
var heartCheck = {
|
|
367
|
|
- timeout: 1000, //25秒
|
|
|
366
|
+ timeout: 25000, //25秒
|
|
368
|
367
|
timeoutObj: null,
|
|
369
|
368
|
serverTimeoutObj: null,
|
|
370
|
369
|
reset: function() {
|
|
|
@@ -392,6 +391,10 @@ var heartCheck = {
|
|
392
|
391
|
sendType="心跳"; //JSON.stringify(data)
|
|
393
|
392
|
mesCont="未收到";
|
|
394
|
393
|
debuggerLog();
|
|
|
394
|
+ if(cls == 0) {
|
|
|
395
|
+ cls = 1;
|
|
|
396
|
+ reconnect();
|
|
|
397
|
+ }
|
|
395
|
398
|
}, self.timeout)
|
|
396
|
399
|
}, this.timeout)
|
|
397
|
400
|
}
|