Skip to content

Commit

Permalink
Fix error reporting in init functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
olgeni committed Jan 11, 2016
1 parent bf12ecb commit f69b563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/eredis_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ init([Host, Port, Database, Password, ReconnectSleep, ConnectTimeout]) ->
{ok, NewState} ->
{ok, NewState};
{error, Reason} ->
{stop, {connection_error, Reason}}
{stop, Reason}
end.

handle_call({request, Req}, From, State) ->
Expand Down
2 changes: 1 addition & 1 deletion src/eredis_sub_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ init([Host, Port, Password, ReconnectSleep, MaxQueueSize, QueueBehaviour]) ->
ok = inet:setopts(NewState#state.socket, [{active, once}]),
{ok, NewState};
{error, Reason} ->
{stop, {connection_error, Reason}}
{stop, Reason}
end.

%% Set the controlling process. All messages on all channels are directed here.
Expand Down

0 comments on commit f69b563

Please sign in to comment.