Merge two aeDeleteFileEvent refs into one (#7521)

Merge two aeDeleteFileEvent refs into one
This commit is contained in:
kukey 2020-11-26 05:37:54 +08:00 committed by GitHub
parent 79a7c17176
commit cf88779527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,8 +147,7 @@ void *connGetPrivateData(connection *conn) {
/* Close the connection and free resources. */
static void connSocketClose(connection *conn) {
if (conn->fd != -1) {
aeDeleteFileEvent(server.el,conn->fd,AE_READABLE);
aeDeleteFileEvent(server.el,conn->fd,AE_WRITABLE);
aeDeleteFileEvent(server.el,conn->fd, AE_READABLE | AE_WRITABLE);
close(conn->fd);
conn->fd = -1;
}