diff --git a/src/WebSockets.jl b/src/WebSockets.jl index 85fa0dc42..4aec44743 100644 --- a/src/WebSockets.jl +++ b/src/WebSockets.jl @@ -384,6 +384,7 @@ function open(f::Function, url; suppress_close_error::Bool=false, verbose=false, close(ws, CloseFrameBody(1008, "Unexpected client websocket error")) end end + rethrow(e) finally if !isclosed(ws) close(ws, CloseFrameBody(1000, ""))