ソースを参照

avoid double callback

Brian Gough 10 年 前
親
コミット
9ab19c5d03
1 ファイル変更、1 行追加、1 行削除
  1. 1 1
      services/real-time/app/coffee/WebsocketController.coffee

+ 1 - 1
services/real-time/app/coffee/WebsocketController.coffee

@@ -113,7 +113,7 @@ module.exports = WebsocketController =
 			AuthorizationManager.assertClientCanViewProject client, (error) ->
 			AuthorizationManager.assertClientCanViewProject client, (error) ->
 				if error?
 				if error?
 					logger.warn {client_id: client.id, project_id, user_id}, "silently ignoring unauthorized updateClientPosition. Client likely hasn't called joinProject yet."
 					logger.warn {client_id: client.id, project_id, user_id}, "silently ignoring unauthorized updateClientPosition. Client likely hasn't called joinProject yet."
-					callback()
+					return callback()
 				cursorData.id      = client.id
 				cursorData.id      = client.id
 				cursorData.user_id = user_id if user_id?
 				cursorData.user_id = user_id if user_id?
 				cursorData.email   = email   if email?
 				cursorData.email   = email   if email?