diff --git a/lib/dalli/pipelined_getter.rb b/lib/dalli/pipelined_getter.rb index cc34bc5c..5fbb8bb2 100644 --- a/lib/dalli/pipelined_getter.rb +++ b/lib/dalli/pipelined_getter.rb @@ -60,7 +60,7 @@ def finish_queries(servers) deleted = [] servers.each do |server| - next unless server.alive? + next unless server.connected? begin finish_query_for_server(server) diff --git a/test/integration/test_network.rb b/test/integration/test_network.rb index b2332244..e66f4396 100644 --- a/test/integration/test_network.rb +++ b/test/integration/test_network.rb @@ -113,6 +113,16 @@ end end + it 'handles timeout error during pipelined get' do + with_nil_logger do + memcached(p, 19_191) do |dc| + dc.send(:ring).server_for_key('abc').sock.stub(:write, proc { raise Timeout::Error }) do + assert_empty dc.get_multi(['abc']) + end + end + end + end + it 'handles asynchronous Thread#raise' do with_nil_logger do memcached(p, 19_191) do |dc|