From 405a487949ca74aa5d910e1f5d6c4573bcc229d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Tue, 2 Apr 2013 18:55:05 +0200
Subject: Fix proc_lib example code

Thanks to Marc Campbell for the heads up!
---
 guide/protocols.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'guide')

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()}),
-- 
cgit v1.2.3