Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ appear at the top.
## [Unreleased][]

* Your contribution here!
* [#447](https://github.com/capistrano/sshkit/pull/447): Fix broken thread safety by widening critical section - [Takumasa Ochi](https://github.com/aeroastro)

## [1.18.0][] (2018-10-21)

Expand Down
2 changes: 1 addition & 1 deletion lib/sshkit/backends/connection_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ def thread_safe_find_or_create_cache(key)
# Update cache key with changed args to prevent cache miss
def update_key_if_args_changed(cache, args)
new_key = cache_key_for_connection_args(args)
return if cache.same_key?(new_key)

caches.synchronize do
return if cache.same_key?(new_key)
caches[new_key] = caches.delete(cache.key)
cache.key = new_key
end
Expand Down