瀏覽代碼

fix poll interval

ericz 12 年之前
父節點
當前提交
78f100a05e
共有 3 個文件被更改,包括 3 次插入2 次删除
  1. 2 1
      dist/peer.js
  2. 0 0
      dist/peer.min.js
  3. 1 1
      lib/socket.js

+ 2 - 1
dist/peer.js

@@ -1482,13 +1482,14 @@ Socket.prototype._setHTTPTimeout = function() {
     } else {
       old.abort();
     }
-  }, 5000);
+  }, 25000);
 };
 
 /** Exposed send for DC & Peer. */
 Socket.prototype.send = function(data) {
   if (!data.type) {
     this.emit('error', 'Invalid message');
+    return;
   }
   
   message = JSON.stringify(data);

File diff suppressed because it is too large
+ 0 - 0
dist/peer.min.js


+ 1 - 1
lib/socket.js

@@ -110,7 +110,7 @@ Socket.prototype._setHTTPTimeout = function() {
     } else {
       old.abort();
     }
-  }, 5000);
+  }, 25000);
 };
 
 /** Exposed send for DC & Peer. */

Some files were not shown because too many files changed in this diff