From 475977242ac5bb9ff8826c2dd8c9a1a180320de2 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 14 May 2010 16:54:39 +0200 Subject: Handle EPIPE as a common connection close event. --- sysdep/unix/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdep') diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index dc7146f..456644b 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1216,7 +1216,8 @@ sk_maybe_write(sock *s) if (errno != EINTR && errno != EAGAIN) { reset_tx_buffer(s); - s->err_hook(s, errno); + /* EPIPE is just a connection close notification during TX */ + s->err_hook(s, (errno != EPIPE) ? errno : 0); return -1; } return 0; -- cgit v1.2.3