Commit 054f16b 1 parent 3f516d7 commit 054f16b Copy full SHA for 054f16b
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -733,8 +733,10 @@ async function connect<SingleConnection extends boolean>(
733
733
}
734
734
}
735
735
} catch ( err ) {
736
- // non-network errors shouldn't ever have "network" in the message, right?
737
- error = / n e t w o r k / i. test ( err ) ? new NetworkError ( err ) : err ;
736
+ // non-network errors shouldn't ever have "network" or "stream" in the message, right?
737
+ // keyword "network" is for Chrome and keyword "stream" is for Firefox
738
+ // TODO: Safari actually completes the stream instead of erroring out, handle that too.
739
+ error = / n e t w o r k | s t r e a m / i. test ( err ) ? new NetworkError ( err ) : err ;
738
740
waitingForThrow ?.( error ) ;
739
741
} finally {
740
742
Object . values ( waiting ) . forEach ( ( { proceed } ) => proceed ( ) ) ;
You can’t perform that action at this time.
0 commit comments