diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2013-08-23 17:14:42 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2013-08-23 17:14:42 -0700 |
commit | a62020cb7781ea55d4759592f4d2ef8fcfbd3b80 (patch) | |
tree | 581c80d83c06fa0f1c95fc15e580610f7108f87a | |
parent | be8aa696bc636aae735ea798feb976600da785fc (diff) | |
download | rabbitmq-c-github-ask-a62020cb7781ea55d4759592f4d2ef8fcfbd3b80.tar.gz |
FIX: use correct buf/len when re-starting send()
Fix a bug that manifested itself by the broker disconnecting the client
with an invalid_frame_end_marker error. The cause was when send()
returned less than the size of the buffer to be sent we weren't using
the correct parameters when restarting the send call.
-rw-r--r-- | librabbitmq/amqp_tcp_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/librabbitmq/amqp_tcp_socket.c b/librabbitmq/amqp_tcp_socket.c index 9a9fc69..ed38c06 100644 --- a/librabbitmq/amqp_tcp_socket.c +++ b/librabbitmq/amqp_tcp_socket.c @@ -55,7 +55,7 @@ amqp_tcp_socket_send_inner(void *base, const void *buf, size_t len, int flags) #endif start: - res = send(self->sockfd, buf, len, flags); + res = send(self->sockfd, buf_left, len_left, flags); if (res < 0) { self->internal_error = amqp_os_socket_error(); |