Browse Source

Upgrade evcom - disable EPIPE error output.

v0.7.4-release
Ryan 16 years ago
parent
commit
2097b9d2e5
  1. 25
      deps/evcom/evcom.c

25
deps/evcom/evcom.c

@ -605,16 +605,20 @@ stream_send__data (evcom_stream *stream)
}
if (sent <= 0) {
if (errno == EAGAIN || errno == EINTR) {
assert(stream->send_action == stream_send__data);
return AGAIN;
}
stream->errorno = errno;
evcom_perror("send()", errno);
switch (errno) {
case EAGAIN:
case EINTR:
assert(stream->send_action == stream_send__data);
return AGAIN;
stream->send_action = stream_send__close;
return OKAY;
default:
stream->errorno = errno;
evcom_perror("send()", errno);
/* pass through */
case EPIPE:
stream->send_action = stream_send__close;
return OKAY;
}
}
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)
if (sent < 0) {
switch (errno) {
case EPIPE:
goto close;
case EINTR:
case EAGAIN:
sent = 0;

Loading…
Cancel
Save