From: Brian Aker Date: Tue, 12 Jun 2012 23:31:42 +0000 (+0100) Subject: Fix such that a close on the socket short's faster. X-Git-Tag: 1.0.9~23 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=cbda284a1c119a467135113b3a85ced915e869aa;p=m6w6%2Flibmemcached Fix such that a close on the socket short's faster. --- diff --git a/libmemcached/io.cc b/libmemcached/io.cc index c848b631..56239529 100644 --- a/libmemcached/io.cc +++ b/libmemcached/io.cc @@ -213,6 +213,10 @@ static memcached_return_t io_wait(memcached_server_write_instance_st ptr, if (active_fd >= 1) { + if (fds.revents & POLLHUP) + { + break; + } assert_msg(active_fd == 1 , "poll() returned an unexpected value"); return MEMCACHED_SUCCESS; }