diff --git a/packages/utils/src/abstract-stream.ts b/packages/utils/src/abstract-stream.ts index a92810d0e4..125660256f 100644 --- a/packages/utils/src/abstract-stream.ts +++ b/packages/utils/src/abstract-stream.ts @@ -284,6 +284,10 @@ export abstract class AbstractStream implements Stream { // Close for both Reading and Writing async close (options?: AbortOptions): Promise { + if (this.status !== 'open') { + return + } + this.log.trace('closing gracefully') this.status = 'closing'