summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-03-14 13:04:26 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-03-14 13:04:26 -0700
commit1904bf447cc1c08af8bc90fe8e11ab4c777e92d0 (patch)
tree93d7eb85d9784c55a2e1d26b996ebf13b4602865
parentd1b103b48dcb6bea632092d1755be053e582b71a (diff)
downloadchef-1904bf447cc1c08af8bc90fe8e11ab4c777e92d0.tar.gz
change to break unless
-rw-r--r--lib/chef/monkey_patches/net-ssh-multi.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/monkey_patches/net-ssh-multi.rb b/lib/chef/monkey_patches/net-ssh-multi.rb
index cb1bc3b2bc..7b7b1bbf7f 100644
--- a/lib/chef/monkey_patches/net-ssh-multi.rb
+++ b/lib/chef/monkey_patches/net-ssh-multi.rb
@@ -119,7 +119,8 @@ if Net::SSH::Multi::Version::STRING == "1.1.0" || Net::SSH::Multi::Version::STRI
count = concurrent_connections ? (concurrent_connections - open_connections) : @pending_sessions.length
count.times do
- (session = @pending_sessions.pop) || break
+ session = @pending_sessions.pop
+ break unless session
# ===== PATCH START
# Increment the open_connections count here to prevent
# creation of connection thread again before that is