File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { TelemetryChannelClient } from "vs/server/src/common/telemetry";
14
14
import "vs/workbench/contrib/localizations/browser/localizations.contribution" ;
15
15
import "vs/workbench/contrib/update/electron-browser/update.contribution" ;
16
16
import { IRemoteAgentService } from "vs/workbench/services/remote/common/remoteAgentService" ;
17
+ import { PersistentConnectionEventType } from "vs/platform/remote/common/remoteAgentConnection" ;
17
18
18
19
class TelemetryService extends TelemetryChannelClient {
19
20
public constructor (
@@ -34,8 +35,17 @@ class NodeProxyService extends NodeProxyChannelClient implements INodeProxyServi
34
35
public constructor (
35
36
@IRemoteAgentService remoteAgentService : IRemoteAgentService ,
36
37
) {
37
- // TODO: up/down/close
38
38
super ( remoteAgentService . getConnection ( ) ! . getChannel ( "nodeProxy" ) ) ;
39
+ remoteAgentService . getConnection ( ) ! . onDidStateChange ( ( state ) => {
40
+ switch ( state . type ) {
41
+ case PersistentConnectionEventType . ConnectionGain :
42
+ return this . _onUp . fire ( ) ;
43
+ case PersistentConnectionEventType . ConnectionLost :
44
+ return this . _onDown . fire ( ) ;
45
+ case PersistentConnectionEventType . ReconnectionPermanentFailure :
46
+ return this . _onClose . fire ( ) ;
47
+ }
48
+ } ) ;
39
49
}
40
50
}
41
51
You can’t perform that action at this time.
0 commit comments