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

Try to reconnect when the editor cursor is moved.

Shane Kilkelly 11 лет назад
Родитель
Сommit
8bd83f64e0
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      services/web/public/coffee/ide/connection/ConnectionManager.coffee

+ 4 - 0
services/web/public/coffee/ide/connection/ConnectionManager.coffee

@@ -24,6 +24,10 @@ define [], () ->
 				if !@connected
 				if !@connected
 					@tryReconnect()
 					@tryReconnect()
 
 
+			@$scope.$on 'cursor:editor:update', () =>
+				if !@connected
+					@tryReconnect()
+
 			@ide.socket = io.connect null,
 			@ide.socket = io.connect null,
 				reconnect: false
 				reconnect: false
 				"force new connection": true
 				"force new connection": true