diff options
Diffstat (limited to 'lib/chef/cookbook/synchronizer.rb')
-rw-r--r-- | lib/chef/cookbook/synchronizer.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/cookbook/synchronizer.rb b/lib/chef/cookbook/synchronizer.rb index 1ee30bacc7..bb44bc3d5c 100644 --- a/lib/chef/cookbook/synchronizer.rb +++ b/lib/chef/cookbook/synchronizer.rb @@ -152,11 +152,11 @@ class Chef queue << lambda do |lock| full_file_path = sync_file(file) - lock.synchronize { + lock.synchronize do # Save the full_path of the downloaded file to be restored in the manifest later save_full_file_path(file, full_file_path) mark_file_synced(file) - } + end end end @@ -291,7 +291,7 @@ class Chef end def server_api - Chef::ServerAPI.new(Chef::Config[:chef_server_url]) + Thread.current[:server_api] ||= Chef::ServerAPI.new(Chef::Config[:chef_server_url], keepalives: true) end end |