Commit ddebeac9 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Fix error code returned in case of SO_RCVTIMEO timer reached

parent 6b5e27cf
......@@ -516,7 +516,7 @@ ssize_t fd_cnx_s_recv(struct cnxctx * conn, void *buffer, size_t length)
again:
ret = recv(conn->cc_socket, buffer, length, 0);
/* Handle special case of timeout */
if ((ret < 0) && (errno == ETIMEDOUT)) {
if ((ret < 0) && (errno == EAGAIN)) {
if (!conn->cc_closing)
goto again; /* don't care, just ignore */
if (!timedout) {
......
......@@ -1130,7 +1130,7 @@ again:
pthread_cleanup_pop(0);
/* First, handle timeouts (same as fd_cnx_s_recv) */
if ((ret < 0) && (errno == ETIMEDOUT)) {
if ((ret < 0) && (errno == EAGAIN)) {
if (!*cc_closing)
goto again; /* don't care, just ignore */
if (!timedout) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment