Skip to content

Commit

Permalink
don't use debug on zmq_tcp_socket
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schultz committed Nov 25, 2011
1 parent b321c8d commit c74da1f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/zmq_tcp_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@

%%-record(state, {}).

-ifdef(debug).
-define(SERVER_OPTS,{debug,[trace]}).
-else.
-define(SERVER_OPTS,).
-endif.

%% ====================================================================
%% External functions
%% ====================================================================

%% @doc Start the server.
start(Port, Opts) ->
gen_listener_tcp:start(?MODULE, [self(), Port, Opts], [{debug,[trace]}]).
gen_listener_tcp:start(?MODULE, [self(), Port, Opts], [?SERVER_OPTS]).

start_link(Port, Opts) ->
gen_listener_tcp:start_link(?MODULE, [self(), Port, Opts], [{debug,[trace]}]).
gen_listener_tcp:start_link(?MODULE, [self(), Port, Opts], [?SERVER_OPTS]).

init([MqSocket, Port, Opts]) ->
{ok, {Port, Opts}, MqSocket}.
Expand Down

0 comments on commit c74da1f

Please sign in to comment.