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.

This commit is contained in:
Henry Oswald 2015-10-05 00:43:37 +01:00
parent 3e55aef25a
commit 89256f9d5f

View file

@ -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."