aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_websocket.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl
index 0e41279..e62a301 100644
--- a/src/cowboy_websocket.erl
+++ b/src/cowboy_websocket.erl
@@ -175,7 +175,8 @@ websocket_handshake(State=#state{socket=Socket, transport=Transport,
handler_before_loop(State#state{messages=Transport:messages()},
Req4, HandlerState, <<>>);
_Any ->
- closed %% If an error happened reading the body, stop there.
+ %% If an error happened reading the body, stop there.
+ handler_terminate(State, Req3, HandlerState, {error, closed})
end;
websocket_handshake(State=#state{transport=Transport, challenge=Challenge},
Req, HandlerState) ->