Skip to content

Commit 9e5d408

Browse files
committed
fix async leak
1 parent d8d6677 commit 9e5d408

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,12 @@ export class GrpcClientImpl implements GrpcClient {
245245
}
246246
}
247247

248-
close() {
248+
async close() {
249249
this.conn.close();
250250
this.conn = null!;
251251
this.closed = true;
252+
await this.ensureConnection()
253+
clearTimeout(this.flushTimer);
252254
}
253255

254256
async _callUnary<Req, Res>(name: string, req: Req): Promise<Res> {

0 commit comments

Comments
 (0)