When splitting the send request into multiple buffers, we must
succeed after we have successfully sent the first buffer, even if not a single byte of some following buffer could be sent. We should probably even succeed whatever the error code -- not sure what is the reason for only doing that for B_WOULD_BLOCK and B_INTERRUPTED. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25121 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ccf92546c4
commit
5843f17cb8
@ -1154,7 +1154,7 @@ socket_send(net_socket *socket, msghdr *header, const void *data, size_t length,
|
||||
size_t sizeAfterSend = buffer->size;
|
||||
gNetBufferModule.free(buffer);
|
||||
|
||||
if (sizeAfterSend != bufferSize
|
||||
if ((sizeAfterSend != bufferSize || bytesSent > 0)
|
||||
&& (status == B_INTERRUPTED || status == B_WOULD_BLOCK)) {
|
||||
// this appears to be a partial write
|
||||
return bytesSent + (bufferSize - sizeAfterSend);
|
||||
|
Loading…
Reference in New Issue
Block a user