diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2017-03-01 21:41:43 -0800 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2017-03-15 23:47:24 -0700 |
commit | a13b8209c3f7ef8ba1396bab1b4e80b7eb9d372c (patch) | |
tree | 5ca6f48c333c4c0e2e21c5bdc0a05fbe8a8a7557 /librabbitmq/amqp_socket.c | |
parent | f1d0cbe1443ab293e13b75d6ce3b54a5e672218d (diff) | |
download | rabbitmq-c-a13b8209c3f7ef8ba1396bab1b4e80b7eb9d372c.tar.gz |
Lib: close socket when amqp_login fails.
Diffstat (limited to 'librabbitmq/amqp_socket.c')
-rw-r--r-- | librabbitmq/amqp_socket.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/librabbitmq/amqp_socket.c b/librabbitmq/amqp_socket.c index d645f0d..22d66de 100644 --- a/librabbitmq/amqp_socket.c +++ b/librabbitmq/amqp_socket.c @@ -1479,10 +1479,8 @@ out: return result; error_res: - result.reply_type = AMQP_RESPONSE_LIBRARY_EXCEPTION; - result.reply.id = 0; - result.reply.decoded = NULL; - result.library_error = res; + amqp_socket_close(state->socket, AMQP_SC_FORCE); + result = amqp_rpc_reply_error(res); goto out; } |