File tree Expand file tree Collapse file tree 2 files changed +187
-264
lines changed
Expand file tree Collapse file tree 2 files changed +187
-264
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ class WebSocketStream {
370370 this . #openedPromise. reject ( new WebSocketError ( 'Socket never opened' ) )
371371 }
372372
373- const result = this . #parser. closingInfo
373+ const result = this . #parser? .closingInfo
374374
375375 // 4. Let code be the WebSocket connection close code .
376376 // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5
@@ -411,10 +411,10 @@ class WebSocketStream {
411411 const error = createUnvalidatedWebSocketError ( 'unclean close' , code , reason )
412412
413413 // 7.2. Error stream ’s readable stream with error .
414- this . #readableStreamController. error ( error )
414+ this . #readableStreamController? .error ( error )
415415
416416 // 7.3. Error stream ’s writable stream with error .
417- this . #writableStream. abort ( error )
417+ this . #writableStream? .abort ( error )
418418
419419 // 7.4. Reject stream ’s closed promise with error .
420420 this . #closedPromise. reject ( error )
You can’t perform that action at this time.
0 commit comments