@@ -89,14 +89,6 @@ import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from 'vs/workbench/services/remote/co
89
89
import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity' ;
90
90
import { UriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentityService' ;
91
91
92
- interface IServerProcessMainStartupOptions {
93
- listenWhenReady ?: boolean ;
94
- }
95
-
96
- interface IServerProcessMain {
97
- startup ( startupOptions : IServerProcessMainStartupOptions ) : Promise < NetServer > ;
98
- }
99
-
100
92
interface ServicesResult {
101
93
instantiationService : IInstantiationService ;
102
94
logService : ILogService ;
@@ -106,7 +98,7 @@ interface ServicesResult {
106
98
/**
107
99
* Handles client connections to a editor instance via IPC.
108
100
*/
109
- export class ServerProcessMain extends Disposable implements IServerProcessMain {
101
+ export class ServerProcessMain extends Disposable implements CodeServerLib . IServerProcessMain {
110
102
private logPrefix = '[Code Server]' ;
111
103
netServer = createNetServer ( ) ;
112
104
@@ -122,9 +114,10 @@ export class ServerProcessMain extends Disposable implements IServerProcessMain
122
114
123
115
private registerListeners ( ) : void {
124
116
process . once ( 'exit' , ( ) => this . dispose ( ) ) ;
117
+ process . once ( 'disconnect' , ( ) => this . dispose ( ) ) ;
125
118
}
126
119
127
- public async startup ( startupOptions : IServerProcessMainStartupOptions = { listenWhenReady : true } ) : Promise < NetServer > {
120
+ public async startup ( startupOptions : CodeServerLib . IServerProcessMainStartupOptions = { listenWhenReady : true } ) : Promise < NetServer > {
128
121
// Services
129
122
const {
130
123
instantiationService,
@@ -160,7 +153,7 @@ export class ServerProcessMain extends Disposable implements IServerProcessMain
160
153
// References:
161
154
// ../../electron-browser/sharedProcess/sharedProcessMain.ts#L148
162
155
// ../../../code/electron-main/app.ts
163
- public async createServices ( startupOptions : IServerProcessMainStartupOptions ) : Promise < ServicesResult > {
156
+ public async createServices ( startupOptions : CodeServerLib . IServerProcessMainStartupOptions ) : Promise < ServicesResult > {
164
157
const services = new ServiceCollection ( ) ;
165
158
166
159
// Product
0 commit comments