Commit 71f10de4 authored by Yossi Gottlieb's avatar Yossi Gottlieb
Browse files

Conns: write() 0 retval should not trigger error.

parent 01321890
......@@ -162,9 +162,7 @@ static void connSocketClose(connection *conn) {
static int connSocketWrite(connection *conn, const void *data, size_t data_len) {
int ret = write(conn->fd, data, data_len);
if (!ret) {
conn->state = CONN_STATE_CLOSED;
} else if (ret < 0 && errno != EAGAIN) {
if (ret < 0 && errno != EAGAIN) {
conn->last_errno = errno;
conn->state = CONN_STATE_ERROR;
}
......
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