File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,8 @@ export class Server {
28
28
}
29
29
30
30
async close ( ) : Promise < void > {
31
- try {
32
- await this . session . serviceProvider ?. close ( true ) ;
33
- } catch {
34
- // Ignore errors during service provider close
35
- }
36
- await this . mcpServer ?. close ( ) ;
31
+ await this . session . close ( ) ;
32
+ await this . mcpServer . close ( ) ;
37
33
}
38
34
39
35
private registerTools ( ) {
Original file line number Diff line number Diff line change @@ -23,4 +23,15 @@ export class Session {
23
23
} ) ;
24
24
}
25
25
}
26
+
27
+ async close ( ) : Promise < void > {
28
+ if ( this . serviceProvider ) {
29
+ try {
30
+ await this . serviceProvider . close ( true ) ;
31
+ } catch ( error ) {
32
+ console . error ( "Error closing service provider:" , error ) ;
33
+ }
34
+ this . serviceProvider = undefined ;
35
+ }
36
+ }
26
37
}
You can’t perform that action at this time.
0 commit comments