Skip to content

Commit

Permalink
pinns eviction loop frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
tisba committed Jan 30, 2019
1 parent 159a1ba commit 162cbfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sshkit/backends/connection_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def inspect

# The ConnectionPool caches connections and allows them to be reused, so long as
# the reuse happens within the `idle_timeout` period. Timed out connections are
# closed, forcing a new connection to be used in that case.
# eventually closed, forcing a new connection to be used in that case.
#
# Additionally, a background thread is started to check for abandoned
# connections that have timed out without any attempt at being reused. These
Expand Down Expand Up @@ -137,7 +137,7 @@ def run_eviction_loop
process_deferred_close

# Periodically sweep all Caches to evict stale connections
sleep([idle_timeout, 5].min)
sleep(5)
caches.values.each(&:evict)
end
end
Expand Down

0 comments on commit 162cbfd

Please sign in to comment.