From f7e14a8e5e65b15d83dc1be3fe2dc47b5c46d764 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 12 Aug 2010 12:55:11 +0200 Subject: s3: Reduce the load on the echo handler If the parent is fast enough, the echo handler should not step in. When the socket becomes readable, the echo handler goes to sleep for a second. If within that second, the parent has picked up the SMB request from the net, the echo handler will just go back to select(). --- source3/smbd/process.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index ea9fb1c5c0..adfcad1bdc 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2671,6 +2671,8 @@ static void smbd_echo_reader(struct tevent_context *ev, bool ok; bool encrypted = false; + smb_msleep(1000); + ok = smbd_lock_socket_internal(sconn); if (!ok) { DEBUG(0, ("%s: failed to lock socket\n", -- cgit