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";
1414import "vs/workbench/contrib/localizations/browser/localizations.contribution" ;
1515import "vs/workbench/contrib/update/electron-browser/update.contribution" ;
1616import { IRemoteAgentService } from "vs/workbench/services/remote/common/remoteAgentService" ;
17+ import { PersistentConnectionEventType } from "vs/platform/remote/common/remoteAgentConnection" ;
1718
1819class TelemetryService extends TelemetryChannelClient {
1920 public constructor (
@@ -34,8 +35,17 @@ class NodeProxyService extends NodeProxyChannelClient implements INodeProxyServi
3435 public constructor (
3536 @IRemoteAgentService remoteAgentService : IRemoteAgentService ,
3637 ) {
37- // TODO: up/down/close
3838 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+ } ) ;
3949 }
4050}
4151
You can’t perform that action at this time.
0 commit comments