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

Commit 57dfaec

Browse files
authored
fix: handle thrown errors (#405)
The pipe can throw when errors occur so handle the errors.
1 parent b1ddaa3 commit 57dfaec

File tree

1 file changed

+3
-3
lines changed
  • packages/interface-stream-muxer-compliance-tests/src

1 file changed

+3
-3
lines changed

packages/interface-stream-muxer-compliance-tests/src/close-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default (common: TestSetup<StreamMuxerFactory>): void => {
8181
direction: 'inbound',
8282
onIncomingStream: (stream) => {
8383
openedStreams++
84-
void pipe(stream, stream)
84+
void pipe(stream, stream).catch(() => {})
8585
}
8686
})
8787

@@ -124,7 +124,7 @@ export default (common: TestSetup<StreamMuxerFactory>): void => {
124124
direction: 'inbound',
125125
onIncomingStream: (stream) => {
126126
openedStreams++
127-
void pipe(stream, stream)
127+
void pipe(stream, stream).catch(() => {})
128128
}
129129
})
130130

@@ -193,7 +193,7 @@ export default (common: TestSetup<StreamMuxerFactory>): void => {
193193
const listener = listenerFactory.createStreamMuxer({
194194
direction: 'inbound',
195195
onIncomingStream: (stream) => {
196-
void pipe(stream, stream)
196+
void pipe(stream, stream).catch(() => {})
197197
}
198198
})
199199

0 commit comments

Comments
 (0)