Skip to content

Commit

Permalink
Don't throw when closed normally
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Aug 29, 2023
1 parent 41bf7ab commit 767cde7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/WebSockets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ function open(f::Function, url; suppress_close_error::Bool=false, verbose=false,
close(ws, CloseFrameBody(1008, "Unexpected client websocket error"))
end
end
rethrow()
if !isok(e)
rethrow()
end
finally
if !isclosed(ws)
close(ws, CloseFrameBody(1000, ""))
Expand Down

0 comments on commit 767cde7

Please sign in to comment.