Skip to content

Commit

Permalink
log host and port on tcp connect error
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Zorn committed Jan 23, 2014
1 parent 7cfebfc commit 800844a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/merle_connect.erl
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,12 @@ terminate(_Reason, #state{free_connections=Free, busy_connections=Busy}) ->
end.

spawn_client(#state{host=Host, port=Port, tcp_options=TCPOpts}) ->
gen_tcp:connect(Host, Port, TCPOpts).
case gen_tcp:connect(Host, Port, TCPOpts) of
{error, Reason} ->
error_log:error_msg("CONNECTION Failed ~p~n", [{Host, Port, TCPOpts, Reason}]),
{error, Reason};
Res -> Res
end.


%% @private
Expand Down

0 comments on commit 800844a

Please sign in to comment.