diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-14 13:04:26 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-14 13:04:26 -0700 |
commit | 1904bf447cc1c08af8bc90fe8e11ab4c777e92d0 (patch) | |
tree | 93d7eb85d9784c55a2e1d26b996ebf13b4602865 /lib/chef/monkey_patches | |
parent | d1b103b48dcb6bea632092d1755be053e582b71a (diff) | |
download | chef-1904bf447cc1c08af8bc90fe8e11ab4c777e92d0.tar.gz |
change to break unless
Diffstat (limited to 'lib/chef/monkey_patches')
-rw-r--r-- | lib/chef/monkey_patches/net-ssh-multi.rb | 3 |
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 |