Skip to content

Commit

Permalink
Fix null pointer in WebSocket code (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Corry authored Aug 1, 2023
1 parent 50c983a commit 0ca2a63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/web_socket.toit
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ class WebSocketReader implements reader.Reader:
owner_ = null
return null
if owner_ == null: return null // Closed.
fragment_reader_ = owner_.next_fragment_
next_fragment := owner_.next_fragment_
if not next_fragment: return null // Closed.
fragment_reader_ = next_fragment
if fragment_reader_.is_ping or fragment_reader_.is_pong:
throw "UNIMPLEMENTED_PING"
else if not fragment_reader_.is_continuation:
Expand Down

0 comments on commit 0ca2a63

Please sign in to comment.