summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-12-30 13:47:41 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2011-12-30 13:47:41 +0000
commit454498cb18b27f475784916c2c5ee8f5b9cdfe63 (patch)
tree55efd475b68f9495b47b7e032a6ec1e8da5c9acd
parent632c8519e015cdfe8e70b562ffd32c6b5f87933a (diff)
downloadrabbitmq-server-454498cb18b27f475784916c2c5ee8f5b9cdfe63.tar.gz
carry on accepting tcp connections after an errorbug24649
-rw-r--r--src/tcp_acceptor.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tcp_acceptor.erl b/src/tcp_acceptor.erl
index 0d50683d..8678c2c9 100644
--- a/src/tcp_acceptor.erl
+++ b/src/tcp_acceptor.erl
@@ -86,6 +86,13 @@ handle_info({inet_async, LSock, Ref, {error, closed}},
%% know this will fail.
{stop, normal, State};
+handle_info({inet_async, LSock, Ref, {error, Reason}},
+ State=#state{sock=LSock, ref=Ref}) ->
+ {Address, Port} = inet_op(fun () -> inet:sockname(LSock) end),
+ error_logger:error_msg("failed to accept TCP connection on ~s:~p: ~p~n",
+ [rabbit_misc:ntoab(Address), Port, Reason]),
+ accept(State);
+
handle_info(_Info, State) ->
{noreply, State}.