summaryrefslogtreecommitdiff
path: root/librabbitmq
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2013-08-23 17:14:42 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2013-08-23 17:14:42 -0700
commita62020cb7781ea55d4759592f4d2ef8fcfbd3b80 (patch)
tree581c80d83c06fa0f1c95fc15e580610f7108f87a /librabbitmq
parentbe8aa696bc636aae735ea798feb976600da785fc (diff)
downloadrabbitmq-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.
Diffstat (limited to 'librabbitmq')
-rw-r--r--librabbitmq/amqp_tcp_socket.c2
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();