summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorWu Cheng-Han2015-09-25 18:34:34 +0800
committerWu Cheng-Han2015-09-25 18:34:34 +0800
commitb87463ae0d3c3e02a578a67d63fb7170fcf63539 (patch)
treebbf9111574b0cca561fb57ac85ca4e2e3616e3e5 /public/js
parent3ab04d4f025ebbd1a10f47e0c05647f3dc8a228d (diff)
Added timeout on socket
Diffstat (limited to 'public/js')
-rw-r--r--public/js/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index c151b533..1348aa7f 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -997,7 +997,9 @@ function havePermission() {
}
//socket.io actions
-var socket = io.connect();
+var socket = io.connect({
+ timeout: 10000 //10 secs to timeout
+});
//overwrite original event for checking login state
var on = socket.on;
socket.on = function () {