Commit b92b5869 authored by Youness Alaoui's avatar Youness Alaoui Committed by Olivier Crête

If allow_partial, then allow a return 0 from the socket

parent 844d2e72
...@@ -3546,7 +3546,7 @@ nice_agent_send_messages_nonblocking_internal ( ...@@ -3546,7 +3546,7 @@ nice_agent_send_messages_nonblocking_internal (
if (n_sent < 0) { if (n_sent < 0) {
g_set_error (&child_error, G_IO_ERROR, G_IO_ERROR_FAILED, g_set_error (&child_error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Error writing data to socket."); "Error writing data to socket.");
} else if (allow_partial) { } else if (n_sent > 0 && allow_partial) {
g_assert (n_messages == 1); g_assert (n_messages == 1);
n_sent = output_message_get_size (messages); n_sent = output_message_get_size (messages);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment