Skip to content

Commit c2f9970

Browse files
committed
Fixed a possible exception
1 parent 523048f commit c2f9970

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/realtime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ function startConnection(socket) {
298298
socket.disconnect(true);
299299
//clear err socket in queue
300300
for (var i = 0; i < connectionSocketQueue.length; i++) {
301-
if (connectionSocketQueue[i].id == socket.id)
301+
if (!connectionSocketQueue[i] || connectionSocketQueue[i].id == socket.id)
302302
connectionSocketQueue.splice(i, 1);
303303
}
304304
isConnectionBusy = false;

0 commit comments

Comments
 (0)