Skip to content

Commit

Permalink
Use each
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
  • Loading branch information
ganmacs committed Jul 23, 2019
1 parent 5dd10e6 commit eda267c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fluent/plugin/out_forward/socket_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eda267c

Please sign in to comment.