Browse Source

Don't close listen fd anyway

ithewei 2 years ago
parent
commit
be856ca1dc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      event/nio.c

+ 2 - 1
event/nio.c

@@ -170,7 +170,8 @@ static void nio_accept(hio_t* io) {
 
 accept_error:
     hloge("listenfd=%d accept error: %s:%d", io->fd, socket_strerror(io->error), io->error);
-    hio_close(io);
+    // NOTE: Don't close listen fd automatically anyway.
+    // hio_close(io);
 }
 
 static void nio_connect(hio_t* io) {