From 1173219ca39eec16db6d96b8883ce61a2253c88e Mon Sep 17 00:00:00 2001 From: Dmitry Demeshchuk <demeshchuk@gmail.com> Date: Thu, 25 Nov 2010 14:39:26 +0300 Subject: [PATCH 3/3] Added TCP connection timeout Improved TCP error handling a bit --- src/riakc_pb_socket.erl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/riakc_pb_socket.erl b/src/riakc_pb_socket.erl index 6da6bc6..92b286e 100644 --- a/src/riakc_pb_socket.erl +++ b/src/riakc_pb_socket.erl @@ -1003,8 +1003,8 @@ connect(State) when State#state.sock =:= undefined -> {ok, Sock} -> {ok, State#state{sock = Sock, connects = Connects+1, reconnect_interval = ?FIRST_RECONNECT_INTERVAL}}; - Error -> - Error + {error, Error} -> + {error, {tcp, Error}} end. %% @private -- 1.7.4.1