mirror of https://github.com/valkey-io/valkey
Update src/socket.c
Co-authored-by: Arthur Lee <arthurkiller@users.noreply.github.com> Signed-off-by: kukey <ch_1159@hotmail.com>
This commit is contained in:
parent
c592be96b6
commit
23acc71d2b
|
|
@ -119,7 +119,11 @@ static int connSocketConnect(connection *conn,
|
|||
conn->state = CONN_STATE_CONNECTING;
|
||||
|
||||
conn->conn_handler = connect_handler;
|
||||
aeCreateFileEvent(server.el, conn->fd, AE_WRITABLE, conn->type->ae_handler, conn);
|
||||
if (aeCreateFileEvent(server.el, conn->fd, AE_WRITABLE, conn->type->ae_handler, conn) == AE_ERR) {
|
||||
conn->state = CONN_STATE_ERROR;
|
||||
conn->last_errno = errno;
|
||||
return C_ERR
|
||||
}
|
||||
|
||||
return C_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue