Skip to content

Commit

Permalink
server: set listener backlog properly
Browse files Browse the repository at this point in the history
Signed-off-by: hexian000 <hexian000@outlook.com>
  • Loading branch information
hexian000 committed Sep 24, 2023
1 parent 9be599d commit ef838c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ bool server_start(struct server *s, const struct sockaddr *bindaddr)
#endif
#if WITH_TCP_FASTOPEN
if (conf->tcp_fastopen) {
socket_set_fastopen(fd, 256);
socket_set_fastopen(fd, conf->startup_limit_full);
}
#endif
socket_set_tcp(fd, conf->tcp_nodelay, conf->tcp_keepalive);
Expand All @@ -151,7 +151,7 @@ bool server_start(struct server *s, const struct sockaddr *bindaddr)
CLOSE_FD(fd);
return false;
}
if (listen(fd, 16)) {
if (listen(fd, conf->startup_limit_full)) {
const int err = errno;
LOGE_F("listen error: %s", strerror(err));
CLOSE_FD(fd);
Expand Down

0 comments on commit ef838c8

Please sign in to comment.