summaryrefslogtreecommitdiff
path: root/source4/smbd/process_single.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smbd/process_single.c')
-rw-r--r--source4/smbd/process_single.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index 56b074a6294..8c9dd2f7fa7 100644
--- a/source4/smbd/process_single.c
+++ b/source4/smbd/process_single.c
@@ -26,6 +26,7 @@
#include "lib/events/events.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
+#include "system/filesys.h"
/*
@@ -51,6 +52,13 @@ static void single_accept_connection(struct event_context *ev,
status = socket_accept(sock, &sock2);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("accept_connection_single: accept: %s\n", nt_errstr(status)));
+ /* this looks strange, but is correct. We need to
+ throttle things until the system clears enough
+ resources to handle this new socket. If we don't
+ then we will spin filling the log and causing more
+ problems. We don't panic as this is probably a
+ temporary resource constraint */
+ sleep(1);
return;
}