瀏覽代碼

Increase backlog to 1024

Tatsuhiro Tsujikawa 8 年之前
父節點
當前提交
6289aafaf8
共有 1 個文件被更改,包括 1 次插入1 次删除
  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()));
   }