From cd2404133611a62457de590e0d3c033af125cd76 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 30 Jan 2012 11:23:36 +0000 Subject: produce only one log entry for abnormal connection closure instead of two --- src/rabbit_reader.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 864d7795..e642c20d 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -225,15 +225,15 @@ start_connection(Parent, ChannelSupSupPid, Collector, StartHeartbeatFun, Deb, try recvloop(Deb, switch_callback(rabbit_event:init_stats_timer( State, #v1.stats_timer), - handshake, 8)) + handshake, 8)), + log(info, "closing AMQP connection ~p (~s)~n", [self(), ConnStr]) catch Ex -> log(case Ex of connection_closed_abruptly -> warning; _ -> error - end, "exception on AMQP connection ~p (~s)~n~p~n", + end, "closing AMQP connection ~p (~s):~n~p~n", [self(), ConnStr, Ex]) after - log(info, "closing AMQP connection ~p (~s)~n", [self(), ConnStr]), %% We don't close the socket explicitly. The reader is the %% controlling process and hence its termination will close %% the socket. Furthermore, gen_tcp:close/1 waits for pending -- cgit v1.2.1