Skip to content

Commit

Permalink
FIX: use correct buf/len when re-starting send()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alanxz committed Aug 26, 2013
1 parent bdda7ab commit 24f4131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion librabbitmq/amqp_tcp_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 24f4131

Please sign in to comment.