don't need to re-initialize when we reconnect a session

This commit is contained in:
ihrpr 2025-04-15 11:58:43 +01:00
commit 54d6929149
No known key found for this signature in database

View file

@ -126,7 +126,11 @@ export class Client<
override async connect(transport: Transport, options?: RequestOptions): Promise<void> {
await super.connect(transport);
// When transport sessionId is already set this means we are trying to reconnect.
// In this case we don't need to initialize again.
if (transport.sessionId !== undefined) {
return;
}
try {
const result = await this.request(
{