client: don't try again after partial write

After a partial write, chances are vanishing that another write() will
succeed.  Don't try immediately.
This commit is contained in:
Max Kellermann 2008-10-31 09:19:40 +01:00
parent b7ee6febaa
commit 5ef17ac1aa
1 changed files with 1 additions and 0 deletions

View File

@ -615,6 +615,7 @@ static void client_write_deferred(struct client *client)
client->deferred_bytes -= ret;
buf->size -= ret;
memmove(buf->data, buf->data + ret, buf->size);
break;
} else {
size_t decr = sizeof(*buf) -
sizeof(buf->data) + buf->size;