summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/realtime.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index 8ed54437..5de3c565 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -329,7 +329,11 @@ var isDisconnectBusy = false;
var disconnectSocketQueue = [];
function finishConnection(socket, note, user) {
- if (!socket || !note || !user) return;
+ if (!socket || !note || !user) {
+ connectionSocketQueue.pop();
+ isConnectionBusy = false;
+ return;
+ }
//check view permission
if (note.permission == 'private') {
if (socket.request.user && socket.request.user.logged_in && socket.request.user.id == note.owner) {