Explorar o código

Increase backlog to 1024

Tatsuhiro Tsujikawa %!s(int64=8) %!d(string=hai) anos
pai
achega
6289aafaf8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/SocketCore.cc

+ 1 - 1
src/SocketCore.cc

@@ -362,7 +362,7 @@ void SocketCore::bind(const struct sockaddr* addr, socklen_t addrlen)
 
 void SocketCore::beginListen()
 {
-  if (listen(sockfd_, 1) == -1) {
+  if (listen(sockfd_, 1024) == -1) {
     int errNum = SOCKET_ERRNO;
     throw DL_ABORT_EX(fmt(EX_SOCKET_LISTEN, errorMsg(errNum).c_str()));
   }