diff options
| author | Michael Klishin <michael@rabbitmq.com> | 2014-08-01 10:59:21 +0400 |
|---|---|---|
| committer | Michael Klishin <michael@rabbitmq.com> | 2014-08-01 10:59:21 +0400 |
| commit | a95edc85dd84c3b0d86c78268c764e2d0b44f4a1 (patch) | |
| tree | d03b8bc37b924dbc3f7e04ae67f8a7214581e81b | |
| parent | e974144d83ba8845c0cc34c768d63c9131b766a2 (diff) | |
| download | rabbitmq-server-git-a95edc85dd84c3b0d86c78268c764e2d0b44f4a1.tar.gz | |
Explicitly log handshake errors
| -rw-r--r-- | src/rabbit_reader.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 68cef56aff..fd5dc20810 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -596,10 +596,13 @@ handle_exception(State = #v1{connection = #connection{protocol = Protocol}, State1 = close_connection(terminate_channels(State)), ok = send_on_channel0(State1#v1.sock, CloseMethod, Protocol), State1; -handle_exception(State, Channel, Reason) -> +handle_exception(State = #v1{connection_state = tuning, + connection = #connection{name = S}}, Channel, Reason) -> %% We don't trust the client at this point - force them to wait %% for a bit so they can't DOS us with repeated failed logins etc. timer:sleep(?SILENT_CLOSE_DELAY * 1000), + log(error, "AMQP connection ~p (~s) handshake error:~n~p~n", + [self(), S, Reason]), throw({handshake_error, State#v1.connection_state, Channel, Reason}). %% we've "lost sync" with the client and hence must not accept any |
