Просмотр исходного кода

added connect timeout option to socket.io.connect needed for the firing of connect_failed. Best way to test is drop connect timeout to 10ms and remove some transports from realtime.

Henry Oswald 11 лет назад
Родитель
Сommit
89256f9d5f

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

@@ -24,6 +24,7 @@ define [], () ->
 
 			@ide.socket = io.connect null,
 				reconnect: false
+				'connect timeout': 30 * 1000
 				"force new connection": true
 
 			@ide.socket.on "connect", () =>
@@ -42,7 +43,7 @@ define [], () ->
 			@ide.socket.on "connect_failed", () =>
 				@connected = false
 				$scope.$apply () =>
-					@$scope.state.error = "Unable to connect, please view the <a href='http://sharelatex.tenderapp.com/help/kb/latex-editor/editor-connection-problems'>connection problems guide</a> to fix the issue."
+					@$scope.state.error = "Unable to connect, please view the <u><a href='http://sharelatex.tenderapp.com/help/kb/latex-editor/editor-connection-problems'>connection problems guide</a></u> to fix the issue."