Skip to content

Commit 81d25ef

Browse files
committed
Bring back the older way of handling websocket_terminate
The older behaviour seems to have been changed unintentionally, in 699569e
1 parent f6892c8 commit 81d25ef

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/websocket_client.erl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,7 @@ cancel_keepalive_timer(WSReq) ->
216216
Reason :: tuple()) -> ok.
217217
websocket_close(WSReq, HandlerState, Reason) ->
218218
Handler = websocket_req:handler(WSReq),
219-
try Handler:websocket_terminate(Reason, WSReq, HandlerState) of
220-
_ ->
221-
case Reason of
222-
normal -> ok;
223-
_ -> error_info(Handler, Reason, HandlerState)
224-
end,
225-
exit(Reason)
219+
try Handler:websocket_terminate(Reason, WSReq, HandlerState)
226220
catch
227221
_:Reason2 ->
228222
error_info(Handler, Reason2, HandlerState),

0 commit comments

Comments
 (0)