Skip to content

Commit 2097b9d

Browse files
committed
Upgrade evcom - disable EPIPE error output.
1 parent 1bd5277 commit 2097b9d

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

deps/evcom/evcom.c

+16-9
Original file line numberDiff line numberDiff line change
@@ -605,16 +605,20 @@ stream_send__data (evcom_stream *stream)
605605
}
606606

607607
if (sent <= 0) {
608-
if (errno == EAGAIN || errno == EINTR) {
609-
assert(stream->send_action == stream_send__data);
610-
return AGAIN;
611-
}
612-
613-
stream->errorno = errno;
614-
evcom_perror("send()", errno);
608+
switch (errno) {
609+
case EAGAIN:
610+
case EINTR:
611+
assert(stream->send_action == stream_send__data);
612+
return AGAIN;
615613

616-
stream->send_action = stream_send__close;
617-
return OKAY;
614+
default:
615+
stream->errorno = errno;
616+
evcom_perror("send()", errno);
617+
/* pass through */
618+
case EPIPE:
619+
stream->send_action = stream_send__close;
620+
return OKAY;
621+
}
618622
}
619623

620624
ev_timer_again(D_LOOP_(stream) &stream->timeout_watcher);
@@ -1151,6 +1155,9 @@ evcom_stream_write (evcom_stream *stream, const char *str, size_t len)
11511155

11521156
if (sent < 0) {
11531157
switch (errno) {
1158+
case EPIPE:
1159+
goto close;
1160+
11541161
case EINTR:
11551162
case EAGAIN:
11561163
sent = 0;

0 commit comments

Comments
 (0)