Skip to content

Commit

Permalink
Return error codes tagged correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
knutin committed Jan 19, 2012
1 parent 5a5a76c commit 00c42be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/eredis_client.erl
Expand Up @@ -241,10 +241,10 @@ connect(State) ->
ok ->
{ok, State#state{socket = Socket}};
{error, Reason} ->
{select_error, Reason}
{error, {select_error, Reason}}
end;
{error, Reason} ->
{authentication_error, Reason}
{error, {authentication_error, Reason}}
end;
{error, Reason} ->
{error, {connection_error, Reason}}
Expand Down Expand Up @@ -279,7 +279,7 @@ do_sync_command(Socket, Command) ->
%% @doc: Loop until a connection can be established, this includes
%% successfully issuing the auth and select calls. When we have a
%% connection, give the socket to the redis client.
reconnect_loop(Client, #state{reconnect_sleep=ReconnectSleep}=State) ->
reconnect_loop(Client, #state{reconnect_sleep = ReconnectSleep} = State) ->
case catch(connect(State)) of
{ok, #state{socket = Socket}} ->
gen_tcp:controlling_process(Socket, Client),
Expand Down

0 comments on commit 00c42be

Please sign in to comment.