mirror of
https://github.com/redis/redis.git
synced 2026-06-09 00:33:08 -04:00
Conns: write() 0 retval should not trigger error.
This commit is contained in:
parent
0132189007
commit
71f10de4de
1 changed files with 1 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue