Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

fix: close streams when connection is closed #214

Merged
merged 5 commits into from
May 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: fix build
  • Loading branch information
achingbrain committed May 19, 2022
commit 6b4b8fcc89b0e66e2b861054aa241e0dd09d4e7f
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ class MockMuxer implements StreamMuxer {
onEnd: (err) => {
this.log('closing muxed streams')
for (const stream of this.streams) {
stream.abort(err)
if (err == null) {
void stream.close().catch()
} else {
stream.abort(err)
}
}
}
})
Expand Down