File tree 4 files changed +20
-0
lines changed
4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -86,4 +86,10 @@ export class BspProxy {
86
86
// TODO: Implement more specific error handling logic here
87
87
} ) ;
88
88
}
89
+
90
+ public closeConnection ( ) : void {
91
+ this . buildServerConnector . close ( ) ;
92
+ this . jdtlsImporterConnector . close ( ) ;
93
+ this . logger . info ( "Build Server connection closed" ) ;
94
+ }
89
95
}
Original file line number Diff line number Diff line change @@ -34,4 +34,10 @@ export class BuildServerConnector {
34
34
public getServerPipePath ( ) : string {
35
35
return this . serverPipePath ;
36
36
}
37
+
38
+ public close ( ) : void {
39
+ this . serverConnection ?. end ( ) ;
40
+ this . serverConnection ?. dispose ( ) ;
41
+ this . serverPipeServer . close ( ) ;
42
+ }
37
43
}
Original file line number Diff line number Diff line change @@ -68,4 +68,10 @@ export class JdtlsImporterConnector {
68
68
public getImporterConnection ( ) : rpc . MessageConnection | null {
69
69
return this . importerConnection ;
70
70
}
71
+
72
+ public close ( ) : void {
73
+ this . importerConnection ?. end ( ) ;
74
+ this . importerConnection ?. dispose ( ) ;
75
+ this . importerPipeServer . close ( ) ;
76
+ }
71
77
}
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ export class GradleServer {
88
88
this . _onDidStop . fire ( null ) ;
89
89
this . ready = false ;
90
90
this . process ?. removeAllListeners ( ) ;
91
+ this . bspProxy . closeConnection ( ) ;
91
92
if ( this . restarting ) {
92
93
this . restarting = false ;
93
94
await this . start ( ) ;
@@ -163,6 +164,7 @@ export class GradleServer {
163
164
}
164
165
165
166
public async asyncDispose ( ) : Promise < void > {
167
+ this . bspProxy . closeConnection ( ) ;
166
168
this . process ?. removeAllListeners ( ) ;
167
169
await this . killProcess ( ) ;
168
170
this . ready = false ;
You can’t perform that action at this time.
0 commit comments