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 | fbc6bb5b1842cdd23a613b59a9c9d40119a6897b (patch) | |
| tree | 264281fa3473b06383c06733ed984bc17167398f | |
| parent | 9bcf475c2181e651cd583e9e768072c848153a84 (diff) | |
| download | rabbitmq-server-git-fbc6bb5b1842cdd23a613b59a9c9d40119a6897b.tar.gz | |
Genericise network messages
| -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 1577b0d514..5a0047923d 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 bc82318af6..1198277875 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, |
