diff options
author | Wu Cheng-Han | 2015-09-25 18:34:34 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2015-09-25 18:34:34 +0800 |
commit | b87463ae0d3c3e02a578a67d63fb7170fcf63539 (patch) | |
tree | bbf9111574b0cca561fb57ac85ca4e2e3616e3e5 /public | |
parent | 3ab04d4f025ebbd1a10f47e0c05647f3dc8a228d (diff) |
Added timeout on socket
Diffstat (limited to '')
-rw-r--r-- | public/js/index.js | 4 |
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 () { |