Skip to content

Commit 416563e

Browse files
committed
feat: Disable client once flushed
1 parent 04d1c80 commit 416563e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/baseclient.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
333333
* @inheritDoc
334334
*/
335335
public async close(timeout?: number): Promise<boolean> {
336-
return this.flush(timeout);
336+
return this.flush(timeout).finally(() => {
337+
this.getOptions().enabled = false;
338+
});
337339
}
338340

339341
/**

0 commit comments

Comments
 (0)