diff options
author | Emile Joubert <emile@rabbitmq.com> | 2013-09-25 10:01:06 +0100 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2013-09-25 10:01:06 +0100 |
commit | b5faad29d77f876640eb1247b49d088035ef2e2a (patch) | |
tree | 264281fa3473b06383c06733ed984bc17167398f /src | |
parent | bdc0e6ec4e13abb2781eebd2273fdc26eaf9242f (diff) | |
download | rabbitmq-server-b5faad29d77f876640eb1247b49d088035ef2e2a.tar.gz |
Genericise network messages
Diffstat (limited to 'src')
-rw-r--r-- | src/rabbit_direct.erl | 5 | ||||
-rw-r--r-- | src/rabbit_reader.erl | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_direct.erl b/src/rabbit_direct.erl index 1577b0d5..5a004792 100644 --- a/src/rabbit_direct.erl +++ b/src/rabbit_direct.erl @@ -92,9 +92,8 @@ connect0(AuthFun, VHost, Protocol, Pid, Infos) -> true -> case AuthFun() of {ok, User} -> connect(User, VHost, Protocol, Pid, Infos); - {refused, Msg, Args} -> - Reason = io_lib:format(Msg, Args), - {error, {auth_failure, Reason}} + {refused, _M, _A} -> + {error, {auth_failure, "Refused"}} end; false -> {error, broker_not_found_on_node} end. diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index bc82318a..11982778 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -978,8 +978,9 @@ auth_phase(Response, case rabbit_misc:table_lookup(Capabilities, <<"authentication_failure_close">>) of {bool, true} -> + AmqpError1 = AmqpError#amqp_error{explanation = "Refused"}, {0, CloseMethod} = rabbit_binary_generator:map_exception( - 0, AmqpError, Protocol), + 0, AmqpError1, Protocol), ok = send_on_channel0(State#v1.sock, CloseMethod, Protocol); _ -> ok end, |