Skip to content

Commit

Permalink
stop if reconnect failed
Browse files Browse the repository at this point in the history
SVN Revision: 95
  • Loading branch information
nniclausse committed Nov 14, 2003
1 parent 36f2995 commit ff651dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ts_client.erl
Expand Up @@ -264,7 +264,7 @@ handle_info(timeout, State ) ->
Now = now(),
%% reconnect if needed
Protocol = State#state.protocol,
Socket = reconnect(State#state.socket, State#state.server, State#state.port,
{ok, Socket} = reconnect(State#state.socket, State#state.server, State#state.port,
Protocol, State#state.rcvpid),
%% warn the receiving side that we are sending a new request
ts_client_rcv:wait_ack({State#state.rcvpid,Profile#message.ack, Now,
Expand Down Expand Up @@ -293,7 +293,7 @@ handle_info(timeout, State ) ->
[self(), Reason], ?ERR),
CountName="send_err_"++atom_to_list(Reason),
ts_mon:addcount({ list_to_atom(CountName) }),
{stop, Reason, State}
{stop, Reason, State};
end.


Expand Down Expand Up @@ -354,7 +354,7 @@ reconnect(none, ServerName, Port, Protocol, Pid) ->
{ok, Socket} ->
controlling_process(Protocol, Socket, Pid),
ts_mon:addcount({ reconnect }),
Socket;
{ok, Socket};
{error, Reason} ->
?LOGF("Error: ~p~n",[Reason],?ERR),
ts_mon:addcount({ failedreconnect }),
Expand Down

0 comments on commit ff651dc

Please sign in to comment.