From eda267cee62e3230d700037fef0fd90a3076c5fa Mon Sep 17 00:00:00 2001 From: Yuta Iwama Date: Tue, 23 Jul 2019 12:30:11 +0900 Subject: [PATCH] Use each Signed-off-by: Yuta Iwama --- lib/fluent/plugin/out_forward/socket_cache.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fluent/plugin/out_forward/socket_cache.rb b/lib/fluent/plugin/out_forward/socket_cache.rb index f017718433..323f5277d1 100644 --- a/lib/fluent/plugin/out_forward/socket_cache.rb +++ b/lib/fluent/plugin/out_forward/socket_cache.rb @@ -87,7 +87,7 @@ def purge_obsolete_socks @inactive_sockets.clear end - while (s = sockets.pop) + sockets.each do |s| s.sock.close rescue nil end end @@ -104,7 +104,7 @@ def clear @inactive_sockets.clear end - while (s = sockets.pop) + sockets.each do |s| s.sock.close rescue nil end end