diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2022-11-05 09:27:11 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2022-11-05 09:27:11 (GMT) |
commit | dbfc7435e69aa3a7868caf8625a89647a2e1cd25 (patch) | |
tree | 9410cf1b924acdd15f1f15a241f0210ce2031d85 /unix/tclUnixSock.c | |
parent | f768eb3bf2d09ebf310ed07f664dc114e1c1412d (diff) | |
parent | 6ab05e04d1c2e4d0a473c114f67d7a8f1cab4dbd (diff) | |
download | tcl-dbfc7435e69aa3a7868caf8625a89647a2e1cd25.zip tcl-dbfc7435e69aa3a7868caf8625a89647a2e1cd25.tar.gz tcl-dbfc7435e69aa3a7868caf8625a89647a2e1cd25.tar.bz2 |
Merge core-8-branch
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r-- | unix/tclUnixSock.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 43303f8..4e34af5 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -1673,6 +1673,7 @@ Tcl_OpenTcpServerEx( const char *service, /* Port number to open. */ const char *myHost, /* Name of local host. */ unsigned int flags, /* Flags. */ + int backlog, /* Length of OS listen backlog queue. */ Tcl_TcpAcceptProc *acceptProc, /* Callback for accepting connections from new * clients. */ @@ -1838,7 +1839,10 @@ Tcl_OpenTcpServerEx( chosenport = ntohs(sockname.sa4.sin_port); } } - status = listen(sock, SOMAXCONN); + if (backlog < 0) { + backlog = SOMAXCONN; + } + status = listen(sock, backlog); if (status < 0) { if (howfar < LISTEN) { howfar = LISTEN; |