Fixed a possible exception

This commit is contained in:
Wu Cheng-Han 2015-09-25 17:37:09 +08:00
parent 523048f111
commit c2f9970ef0

View file

@ -298,7 +298,7 @@ function startConnection(socket) {
socket.disconnect(true); socket.disconnect(true);
//clear err socket in queue //clear err socket in queue
for (var i = 0; i < connectionSocketQueue.length; i++) { 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); connectionSocketQueue.splice(i, 1);
} }
isConnectionBusy = false; isConnectionBusy = false;