aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-04-02 18:55:05 +0200
committerLoïc Hoguin <[email protected]>2013-04-02 18:55:05 +0200
commit405a487949ca74aa5d910e1f5d6c4573bcc229d6 (patch)
tree25ab6745fe5d303f4d81e3b0ef7e47e4205185ca
parent8203188155aa9243a4cdcec4962d9b190d2acb5b (diff)
downloadranch-405a487949ca74aa5d910e1f5d6c4573bcc229d6.tar.gz
ranch-405a487949ca74aa5d910e1f5d6c4573bcc229d6.tar.bz2
ranch-405a487949ca74aa5d910e1f5d6c4573bcc229d6.zip
Fix proc_lib example code
Thanks to Marc Campbell for the heads up!
-rw-r--r--guide/protocols.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guide/protocols.md b/guide/protocols.md
index ae9e8b6..6935cdc 100644
--- a/guide/protocols.md
+++ b/guide/protocols.md
@@ -83,11 +83,11 @@ the normal `gen_server` execution loop.
-behaviour(ranch_protocol).
-export([start_link/4]).
--export([init/1]).
+-export([init/4]).
%% Exports of other gen_server callbacks here.
start_link(Ref, Socket, Transport, Opts) ->
- proc_lib:start_link(?MODULE, [[Ref, Socket, Transport, Opts]]).
+ proc_lib:start_link(?MODULE, init, [Ref, Socket, Transport, Opts]).
init(Ref, Socket, Transport, _Opts = []) ->
ok = proc_lib:init_ack({ok, self()}),