Browse Source

enlarge backlog number

pull/177/head
Max Lv 10 years ago
parent
commit
1a94c7b68f
1 changed files with 5 additions and 1 deletions
  1. 6
      src/server.c

6
src/server.c

@ -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);

Loading…
Cancel
Save