diff options
author | Wu Cheng-Han | 2015-09-25 17:37:09 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2015-09-25 17:37:09 +0800 |
commit | c2f9970ef0395f9fea82e1baba2e1e2614e94b5c (patch) | |
tree | 2a8c9950ab669b29fb3acdd70009f2ddd279d7a2 /lib | |
parent | 523048f111250b92ab64b694941fdec487ef306e (diff) |
Fixed a possible exception
Diffstat (limited to '')
-rw-r--r-- | lib/realtime.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/realtime.js b/lib/realtime.js index 86d361ef..79562901 100644 --- a/lib/realtime.js +++ b/lib/realtime.js @@ -298,7 +298,7 @@ function startConnection(socket) { socket.disconnect(true); //clear err socket in queue for (var i = 0; i < connectionSocketQueue.length; i++) { - if (connectionSocketQueue[i].id == socket.id) + if (!connectionSocketQueue[i] || connectionSocketQueue[i].id == socket.id) connectionSocketQueue.splice(i, 1); } isConnectionBusy = false; |