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.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl
index 7bb5e74..b5075c0 100644
--- a/src/cowboy_websocket.erl
+++ b/src/cowboy_websocket.erl
@@ -63,8 +63,8 @@
| {suspend, module(), atom(), [any()]}
when Req::cowboy_req:req(), Env::cowboy_middleware:env().
upgrade(Req, Env, Handler, HandlerOpts) ->
- {_, ListenerPid} = lists:keyfind(listener, 1, Env),
- ranch_listener:remove_connection(ListenerPid),
+ {_, Ref} = lists:keyfind(listener, 1, Env),
+ ranch:remove_connection(Ref),
[Socket, Transport] = cowboy_req:get([socket, transport], Req),
State = #state{env=Env, socket=Socket, transport=Transport,
handler=Handler, handler_opts=HandlerOpts},