diff options
author | juhlig <[email protected]> | 2019-06-06 17:52:34 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-07-16 15:35:45 +0200 |
commit | 5b4e78fac483c5eb277fec4ab7e8c6a62821bf4b (patch) | |
tree | bb06aa4e6b00901da26e44f546f97f447e995f18 /src/cowboy_clear.erl | |
parent | 7708fc77cd95768aef65bd0eb366ee300cc0515f (diff) | |
download | cowboy-5b4e78fac483c5eb277fec4ab7e8c6a62821bf4b.tar.gz cowboy-5b4e78fac483c5eb277fec4ab7e8c6a62821bf4b.tar.bz2 cowboy-5b4e78fac483c5eb277fec4ab7e8c6a62821bf4b.zip |
Make Cowboy compatible with upcoming Ranch 2.0
Diffstat (limited to 'src/cowboy_clear.erl')
-rw-r--r-- | src/cowboy_clear.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cowboy_clear.erl b/src/cowboy_clear.erl index 7bb1a35..0af734f 100644 --- a/src/cowboy_clear.erl +++ b/src/cowboy_clear.erl @@ -15,11 +15,18 @@ -module(cowboy_clear). -behavior(ranch_protocol). +-export([start_link/3]). -export([start_link/4]). -export([connection_process/4]). +%% Ranch 1. -spec start_link(ranch:ref(), inet:socket(), module(), cowboy:opts()) -> {ok, pid()}. start_link(Ref, _Socket, Transport, Opts) -> + start_link(Ref, Transport, Opts). + +%% Ranch 2. +-spec start_link(ranch:ref(), module(), cowboy:opts()) -> {ok, pid()}. +start_link(Ref, Transport, Opts) -> Pid = proc_lib:spawn_link(?MODULE, connection_process, [self(), Ref, Transport, Opts]), {ok, Pid}. |