diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-12 12:55:11 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-12 13:32:16 +0200 |
commit | f7e14a8e5e65b15d83dc1be3fe2dc47b5c46d764 (patch) | |
tree | f8c3e13ad6579a6cc861d1ba3e0c66a6be02155d | |
parent | c672797a0a2fe3aa3bd2d2ef449cb5866d289981 (diff) | |
download | samba-f7e14a8e5e65b15d83dc1be3fe2dc47b5c46d764.tar.gz samba-f7e14a8e5e65b15d83dc1be3fe2dc47b5c46d764.tar.bz2 samba-f7e14a8e5e65b15d83dc1be3fe2dc47b5c46d764.zip |
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().
-rw-r--r-- | source3/smbd/process.c | 2 |
1 files changed, 2 insertions, 0 deletions
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", |