aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_http_protocol.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index d950373..d9fa04b 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -135,7 +135,9 @@ handler_init(Req, State=#state{
case catch Handler:init({Transport:name(), http}, Req, Opts) of
{ok, Req, HandlerState} ->
handler_loop(HandlerState, Req, State);
- %% @todo {upgrade, transport, Module}; {upgrade, protocol, Module}
+ %% @todo {upgrade, transport, Module}
+ {upgrade, protocol, Module} ->
+ Module:upgrade(Handler, Opts, Req);
{'EXIT', _Reason} ->
error_terminate(500, State)
end.