Skip to content

Commit

Permalink
Also rethrow when upgrading websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Jul 12, 2023
1 parent 56cb95e commit 2282828
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/WebSockets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ function upgrade(f::Function, http::Streams.Stream; suppress_close_error::Bool=f
close(ws, CloseFrameBody(1011, "Unexpected server websocket error"))
end
end
if !isok(e)
rethrow()
end
finally
if !isclosed(ws)
close(ws, CloseFrameBody(1000, ""))
Expand Down

0 comments on commit 2282828

Please sign in to comment.