From cbda284a1c119a467135113b3a85ced915e869aa Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Wed, 13 Jun 2012 00:31:42 +0100 Subject: [PATCH] Fix such that a close on the socket short's faster. --- libmemcached/io.cc | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.30.2