From 524e632903cfcd9ca20b7742a07f9bffaa720f97 Mon Sep 17 00:00:00 2001 From: tabcat Date: Sun, 13 Oct 2024 11:25:49 +0700 Subject: [PATCH] fix(mock-connection): use this.muxer.close --- .../interface-compliance-tests/src/mocks/connection.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/interface-compliance-tests/src/mocks/connection.ts b/packages/interface-compliance-tests/src/mocks/connection.ts index 41758718c8..9574f0b91f 100644 --- a/packages/interface-compliance-tests/src/mocks/connection.ts +++ b/packages/interface-compliance-tests/src/mocks/connection.ts @@ -100,9 +100,7 @@ class MockConnection implements Connection { async close (options?: AbortOptions): Promise { this.status = 'closing' - await Promise.all( - this.streams.map(async s => s.close(options)) - ) + await this.muxer.close() await this.maConn.close() this.status = 'closed' this.timeline.close = Date.now() @@ -110,9 +108,7 @@ class MockConnection implements Connection { abort (err: Error): void { this.status = 'closing' - this.streams.forEach(s => { - s.abort(err) - }) + this.muxer.abort(err) this.maConn.abort(err) this.status = 'closed' this.timeline.close = Date.now()