|
@@ -164,7 +164,7 @@ websocket_handshake(State=#state{version=0, origin=Origin,
|
|
|
[{<<"Upgrade">>, <<"WebSocket">>},
|
|
|
{<<"Sec-Websocket-Location">>, Location},
|
|
|
{<<"Sec-Websocket-Origin">>, Origin}],
|
|
|
- Req#http_req{resp_state=waiting}),
|
|
|
+ Req),
|
|
|
%% Flush the resp_sent message before moving on.
|
|
|
receive {cowboy_req, resp_sent} -> ok after 0 -> ok end,
|
|
|
%% We replied with a proper response. Proxies should be happy enough,
|
|
@@ -191,7 +191,7 @@ websocket_handshake(State=#state{challenge=Challenge},
|
|
|
101,
|
|
|
[{<<"Upgrade">>, <<"websocket">>},
|
|
|
{<<"Sec-Websocket-Accept">>, Challenge}],
|
|
|
- Req#http_req{resp_state=waiting}),
|
|
|
+ Req),
|
|
|
%% Flush the resp_sent message before moving on.
|
|
|
receive {cowboy_req, resp_sent} -> ok after 0 -> ok end,
|
|
|
handler_before_loop(State#state{messages=Transport:messages()},
|