summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/realtime.js2
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;