summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBo Yang <boyang@samba.org>2009-05-22 03:22:52 +0800
committerBo Yang <boyang@samba.org>2009-05-22 03:22:52 +0800
commitd7480a91b4331a5c98517338f2c258bf270926a3 (patch)
tree229f02de01c53969076684b40cafcdc4773d66b2 /source3
parentcbe3dabb9d1fe4e16e14c50550df2afab7e4a21e (diff)
downloadsamba-d7480a91b4331a5c98517338f2c258bf270926a3.tar.gz
samba-d7480a91b4331a5c98517338f2c258bf270926a3.tar.bz2
samba-d7480a91b4331a5c98517338f2c258bf270926a3.zip
s3: ignore EPIPE error when winbind finally writes to wb client because client might have already closed the socket
Signed-off-by: Bo Yang <boyang@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index fb7eda92c4..52517b01bb 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -866,8 +866,14 @@ static void remove_client(struct winbindd_cli_state *state)
/* tell client, we are closing ... */
nwritten = write(state->sock, &c, sizeof(c));
if (nwritten == -1) {
- DEBUG(2, ("final write to client failed: %s\n",
- strerror(errno)));
+ /*
+ * ignore EPIPE error here, because the other end might
+ * have already closed the socket.
+ */
+ if (errno != EPIPE) {
+ DEBUG(2, ("final write to client failed: %s\n",
+ strerror(errno)));
+ }
}
/* Close socket */