summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index 90ad5ff67..ff22be68f 100644
--- a/packet.c
+++ b/packet.c
@@ -956,7 +956,8 @@ packet_read_seqnr(u_int32_t *seqnr_p)
956 if ((ret = select(connection_in + 1, setp, NULL, 956 if ((ret = select(connection_in + 1, setp, NULL,
957 NULL, timeoutp)) >= 0) 957 NULL, timeoutp)) >= 0)
958 break; 958 break;
959 if (errno != EAGAIN && errno != EINTR) 959 if (errno != EAGAIN && errno != EINTR &&
960 errno != EWOULDBLOCK)
960 break; 961 break;
961 if (packet_timeout_ms == -1) 962 if (packet_timeout_ms == -1)
962 continue; 963 continue;
@@ -1475,7 +1476,7 @@ packet_write_poll(void)
1475 if (len > 0) { 1476 if (len > 0) {
1476 len = write(connection_out, buffer_ptr(&output), len); 1477 len = write(connection_out, buffer_ptr(&output), len);
1477 if (len <= 0) { 1478 if (len <= 0) {
1478 if (errno == EAGAIN) 1479 if (errno == EAGAIN || errno == EWOULDBLOCK)
1479 return; 1480 return;
1480 else 1481 else
1481 fatal("Write failed: %.100s", strerror(errno)); 1482 fatal("Write failed: %.100s", strerror(errno));
@@ -1516,7 +1517,8 @@ packet_write_wait(void)
1516 if ((ret = select(connection_out + 1, NULL, setp, 1517 if ((ret = select(connection_out + 1, NULL, setp,
1517 NULL, timeoutp)) >= 0) 1518 NULL, timeoutp)) >= 0)
1518 break; 1519 break;
1519 if (errno != EAGAIN && errno != EINTR) 1520 if (errno != EAGAIN && errno != EINTR &&
1521 errno != EWOULDBLOCK)
1520 break; 1522 break;
1521 if (packet_timeout_ms == -1) 1523 if (packet_timeout_ms == -1)
1522 continue; 1524 continue;