Skip to content

Commit f1d70af

Browse files
chore: gulp disconnect error and set correct state
1 parent ca40afc commit f1d70af

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/mcp/vsCodeMCPConnectionManager.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,19 @@ export class VSCodeMCPConnectionManager extends ConnectionManager {
6868
async disconnect(): Promise<ConnectionStateDisconnected> {
6969
try {
7070
await this.activeConnectionProvider?.close(true);
71-
return this.changeState('connection-close', {
72-
tag: 'disconnected',
73-
});
7471
} catch (error) {
7572
this.logger.error({
7673
id: MCPLogIds.DisconnectError,
7774
context: 'VSCodeMCPConnectionManager.disconnect',
7875
message: error instanceof Error ? error.message : String(error),
7976
});
80-
throw error;
81-
} finally {
82-
this.activeConnectionId = null;
83-
this.activeConnectionProvider = null;
8477
}
78+
79+
this.activeConnectionId = null;
80+
this.activeConnectionProvider = null;
81+
return this.changeState('connection-close', {
82+
tag: 'disconnected',
83+
});
8584
}
8685

8786
async updateConnection({

0 commit comments

Comments
 (0)