Skip to content

Commit

Permalink
Close socket on unhandled read errors. (Tao Hui <taohui3@gmail.com>)
Browse files Browse the repository at this point in the history
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@707 b0b603af-a30f-0410-a34e-baf09ae79d0b
  • Loading branch information
taohui committed Feb 22, 2008
1 parent 99bb3a5 commit 57e3367
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion memcached.c
Expand Up @@ -1940,7 +1940,9 @@ static int try_read_network(conn *c) {
}
if (res == -1) {
if (errno == EAGAIN || errno == EWOULDBLOCK) break;
else return 0;
/* Should close on unhandled errors. */
conn_set_state(c, conn_closing);
return 1;
}
}
return gotdata;
Expand Down

0 comments on commit 57e3367

Please sign in to comment.