From 78e5bf0ab3e8d7f8aabf547880160cc39ae59574 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 26 Sep 2009 14:53:59 +1000 Subject: - (djm) [packet.c] Restore EWOULDBLOCK handling that got lost somewhere --- packet.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'packet.c') diff --git a/packet.c b/packet.c index 600e015fb..994e35b6d 100644 --- a/packet.c +++ b/packet.c @@ -1070,7 +1070,8 @@ packet_read_seqnr(u_int32_t *seqnr_p) if ((ret = select(active_state->connection_in + 1, setp, NULL, NULL, timeoutp)) >= 0) break; - if (errno != EAGAIN && errno != EINTR) + if (errno != EAGAIN && errno != EINTR && + errno != EWOULDBLOCK) break; if (active_state->packet_timeout_ms == -1) continue; @@ -1643,7 +1644,8 @@ packet_write_poll(void) len = roaming_write(active_state->connection_out, buffer_ptr(&active_state->output), len, &cont); if (len == -1) { - if (errno == EINTR || errno == EAGAIN) + if (errno == EINTR || errno == EAGAIN || + errno == EWOULDBLOCK) return; fatal("Write failed: %.100s", strerror(errno)); } @@ -1685,7 +1687,8 @@ packet_write_wait(void) if ((ret = select(active_state->connection_out + 1, NULL, setp, NULL, timeoutp)) >= 0) break; - if (errno != EAGAIN && errno != EINTR) + if (errno != EAGAIN && errno != EINTR && + errno != EWOULDBLOCK) break; if (active_state->packet_timeout_ms == -1) continue; -- cgit v1.2.3