add Connection.reconnect() to serverless driver

This commit is contained in:
Mayank Verma
2025-09-10 02:17:12 +05:30
parent 77e5190113
commit 745feb131f

View File

@@ -223,6 +223,17 @@ export class Connection {
this.isOpen = false;
await this.session.close();
}
reconnect(): void {
try {
if (this.isOpen) {
this.close();
}
} finally {
this.session = new Session(this.config);
this.isOpen = true;
}
}
}
/**