Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/WebSockets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ function open(f::Function, url; suppress_close_error::Bool=false, verbose=false,
close(ws, CloseFrameBody(1008, "Unexpected client websocket error"))
end
end
if !isok(e)
rethrow()
end
finally
if !isclosed(ws)
close(ws, CloseFrameBody(1000, ""))
Expand Down Expand Up @@ -448,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