Skip to content

Commit b87463a

Browse files
committed
Added timeout on socket
1 parent 3ab04d4 commit b87463a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

public/js/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,9 @@ function havePermission() {
997997
}
998998

999999
//socket.io actions
1000-
var socket = io.connect();
1000+
var socket = io.connect({
1001+
timeout: 10000 //10 secs to timeout
1002+
});
10011003
//overwrite original event for checking login state
10021004
var on = socket.on;
10031005
socket.on = function () {

0 commit comments

Comments
 (0)