mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-27 19:23:40 +00:00
enlarge backlog number
This commit is contained in:
+5
-1
@@ -64,6 +64,10 @@
|
||||
#define BUF_SIZE 2048
|
||||
#endif
|
||||
|
||||
#ifndef SSMAXCONN
|
||||
#define SSMAXCONN 1024
|
||||
#endif
|
||||
|
||||
static void signal_cb(EV_P_ ev_signal *w, int revents);
|
||||
static void accept_cb(EV_P_ ev_io *w, int revents);
|
||||
static void server_recv_cb(EV_P_ ev_io *w, int revents);
|
||||
@@ -1088,7 +1092,7 @@ int main(int argc, char **argv)
|
||||
if (listenfd < 0) {
|
||||
FATAL("bind() error..");
|
||||
}
|
||||
if (listen(listenfd, SOMAXCONN) == -1) {
|
||||
if (listen(listenfd, SSMAXCONN) == -1) {
|
||||
FATAL("listen() error.");
|
||||
}
|
||||
setnonblocking(listenfd);
|
||||
|
||||
Reference in New Issue
Block a user