aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcoopgamma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcoopgamma.c')
-rw-r--r--src/libcoopgamma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c
index b72e856..2a9879b 100644
--- a/src/libcoopgamma.c
+++ b/src/libcoopgamma.c
@@ -1475,9 +1475,11 @@ int libcoopgamma_flush(libcoopgamma_context_t* restrict ctx)
{
sendsize = ctx->outbound_head - ctx->outbound_tail;
sendsize = sendsize < chunksize ? sendsize : chunksize;
- sent = send(ctx->fd, ctx->outbound + ctx->outbound_tail, sendsize, 0);
+ sent = send(ctx->fd, ctx->outbound + ctx->outbound_tail, sendsize, MSG_NOSIGNAL);
if (sent < 0)
{
+ if (errno == EPIPE)
+ errno = ECONNRESET;
if (errno != EMSGSIZE)
return -1;
if ((chunksize >>= 1) == 0)