File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -69,5 +69,13 @@ export abstract class TransportRunnerBase {
6969
7070 abstract start ( ) : Promise < void > ;
7171
72- abstract close ( ) : Promise < void > ;
72+ abstract closeTransport ( ) : Promise < void > ;
73+
74+ async close ( ) : Promise < void > {
75+ try {
76+ await this . closeTransport ( ) ;
77+ } finally {
78+ this . deviceId . close ( ) ;
79+ }
80+ }
7381}
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export class StdioRunner extends TransportRunnerBase {
7474 }
7575 }
7676
77- async close ( ) : Promise < void > {
77+ async closeTransport ( ) : Promise < void > {
7878 await this . server ?. close ( ) ;
7979 }
8080}
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ export class StreamableHttpRunner extends TransportRunnerBase {
147147 } ) ;
148148 }
149149
150- async close ( ) : Promise < void > {
150+ async closeTransport ( ) : Promise < void > {
151151 await Promise . all ( [
152152 this . sessionStore . closeAllSessions ( ) ,
153153 new Promise < void > ( ( resolve , reject ) => {
You can’t perform that action at this time.
0 commit comments