X-Git-Url: https://git.m6w6.name/?p=m6w6%2Flibmemcached;a=blobdiff_plain;f=contrib%2Fbin%2Fmemaslap%2Fms_conn.c;h=db54d501302a23152c78298dd847fbf1cd411922;hp=10737de543dad9a490838a7dbb2903ac93baa8e5;hb=01c5e0ed8d3d9c72ea192792d1c49a50e756d635;hpb=808f81dba2553a1e552e8f3cea3ee376ad7d3558 diff --git a/contrib/bin/memaslap/ms_conn.c b/contrib/bin/memaslap/ms_conn.c index 10737de5..db54d501 100644 --- a/contrib/bin/memaslap/ms_conn.c +++ b/contrib/bin/memaslap/ms_conn.c @@ -1451,7 +1451,7 @@ static int ms_try_read_network(ms_conn_t *c) { return -1; } if (res == -1) { - if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) + if ((errno == EAGAIN) || (EAGAIN != EWOULDBLOCK && errno == EWOULDBLOCK)) break; /* Should close on unhandled errors. */ ms_conn_set_state(c, conn_closing); @@ -1909,7 +1909,7 @@ static int ms_transmit(ms_conn_t *c) { } return TRANSMIT_INCOMPLETE; } - if ((res == -1) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) { + if ((res == -1) && ((errno == EAGAIN) || (EAGAIN != EWOULDBLOCK && errno == EWOULDBLOCK))) { if (!ms_update_event(c, EV_WRITE | EV_PERSIST)) { fprintf(stderr, "Couldn't update event.\n"); ms_conn_set_state(c, conn_closing);