mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
parameterise the listen backlog in smbd and make it larger by default. A backlog of 5 is way too small these days.
This commit is contained in:
parent
26bfe37a10
commit
bbb92d2b0e
@ -227,4 +227,7 @@
|
|||||||
/* Buffer size to use when printing backtraces */
|
/* Buffer size to use when printing backtraces */
|
||||||
#define BACKTRACE_STACK_SIZE 64
|
#define BACKTRACE_STACK_SIZE 64
|
||||||
|
|
||||||
|
/* size of listen() backlog in smbd */
|
||||||
|
#define SMBD_LISTEN_BACKLOG 50
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -250,7 +250,7 @@ static BOOL open_sockets_smbd(BOOL is_daemon, BOOL interactive, const char *smb_
|
|||||||
set_socket_options(s,"SO_KEEPALIVE");
|
set_socket_options(s,"SO_KEEPALIVE");
|
||||||
set_socket_options(s,user_socket_options);
|
set_socket_options(s,user_socket_options);
|
||||||
|
|
||||||
if (listen(s, 5) == -1) {
|
if (listen(s, SMBD_LISTEN_BACKLOG) == -1) {
|
||||||
DEBUG(0,("listen: %s\n",strerror(errno)));
|
DEBUG(0,("listen: %s\n",strerror(errno)));
|
||||||
close(s);
|
close(s);
|
||||||
return False;
|
return False;
|
||||||
@ -286,7 +286,7 @@ static BOOL open_sockets_smbd(BOOL is_daemon, BOOL interactive, const char *smb_
|
|||||||
set_socket_options(s,"SO_KEEPALIVE");
|
set_socket_options(s,"SO_KEEPALIVE");
|
||||||
set_socket_options(s,user_socket_options);
|
set_socket_options(s,user_socket_options);
|
||||||
|
|
||||||
if (listen(s, 5) == -1) {
|
if (listen(s, SMBD_LISTEN_BACKLOG) == -1) {
|
||||||
DEBUG(0,("open_sockets_smbd: listen: %s\n",
|
DEBUG(0,("open_sockets_smbd: listen: %s\n",
|
||||||
strerror(errno)));
|
strerror(errno)));
|
||||||
close(s);
|
close(s);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user