aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_websocket.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_websocket.erl')
-rw-r--r--src/cowboy_websocket.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl
index abcc015..51fed54 100644
--- a/src/cowboy_websocket.erl
+++ b/src/cowboy_websocket.erl
@@ -66,7 +66,7 @@
upgrade(Req, Env, Handler, HandlerOpts) ->
{_, ListenerPid} = lists:keyfind(listener, 1, Env),
ranch_listener:remove_connection(ListenerPid),
- {ok, Transport, Socket} = cowboy_req:transport(Req),
+ [Socket, Transport] = cowboy_req:get([socket, transport], Req),
State = #state{env=Env, socket=Socket, transport=Transport,
handler=Handler, handler_opts=HandlerOpts},
case catch websocket_upgrade(State, Req) of