Przeglądaj źródła

use socket.io connect method instead of reconnect

the reconnect method tries 10 times by default, but we want to manage
reconnections ourselves
Brian Gough 10 lat temu
rodzic
commit
d57e191ad0

+ 3 - 1
services/web/public/coffee/ide/connection/ConnectionManager.coffee

@@ -207,7 +207,9 @@ define [], () ->
 			delete @$scope.connection.reconnection_countdown
 			delete @$scope.connection.reconnection_countdown
 			return if @connected
 			return if @connected
 			@$scope.connection.reconnecting = true
 			@$scope.connection.reconnecting = true
-			@ide.socket.socket.reconnect()
+			# use socket.io connect() here to make a single attempt, the
+			# reconnect() method makes multiple attempts
+			@ide.socket.socket.connect()
 			setTimeout (=> @startAutoReconnectCountdown() if !@connected), 2000
 			setTimeout (=> @startAutoReconnectCountdown() if !@connected), 2000
 
 
 		disconnectIfInactive: ()->
 		disconnectIfInactive: ()->