summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/io.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-05-14 16:54:39 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-05-14 16:54:39 +0200
commit475977242ac5bb9ff8826c2dd8c9a1a180320de2 (patch)
tree492a30a92b83d398635c5c4e720ae140a1a53513 /sysdep/unix/io.c
parent0267f49fb2e44525aa2777bcb9900c4bb2db41e1 (diff)
downloadbird-475977242ac5bb9ff8826c2dd8c9a1a180320de2.tar
bird-475977242ac5bb9ff8826c2dd8c9a1a180320de2.zip
Handle EPIPE as a common connection close event.
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r--sysdep/unix/io.c3
1 files changed, 2 insertions, 1 deletions
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;