sshkit 1.18.1 → 1.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0eb90af6c1f3c123cafc1739b6c8783d5a41a18eb93c962cfd39909e955ad1d
4
- data.tar.gz: a5fc8373c24f79313fd6ec129e5cc67f8f8a9e8db37edd6d6188489de9c828c7
3
+ metadata.gz: 886f5d73c7b9a9570763c9f0612130367e2eaf484056d937635661de55755c1b
4
+ data.tar.gz: 2bb004e4b0df817573f5908269388abf0f8f016c3b25822db5df337eb857d0f3
5
5
  SHA512:
6
- metadata.gz: 218acec6e67c5e4c71e4db4a9f69e1417339038d8d585b3fc16822714c962676e06eecd84664dd190896d682fd25782ce42c094332c8060ae4bad319b7b11849
7
- data.tar.gz: 2752f4f661e29a627e946f3b14f85aacdc3a97a3c744380a9deb1f81bbc2ac8b8e9cf778f889ac036133540b62870080ac56b03aa03d1996bc873990263ad522
6
+ metadata.gz: d3d4bbf920f05e70bfa1c9333e5f39d91b43fe28a63d726236b521315b6a0cf9b4132e29a26383992bf072d5186b0abbd4203c4c3c13c7c126666fe1a3876ed7
7
+ data.tar.gz: '082d51b64a6690cc09ed82f958c7bd9f3971c8ab6340075caf718fab56c72092a31f78fea493c5eb61e74b5e4994bbdec5eae6c6802cfe8b90766aa52789f60c'
@@ -7,6 +7,10 @@ appear at the top.
7
7
 
8
8
  * Your contribution here!
9
9
 
10
+ ## [1.18.2][] (2019-02-03)
11
+
12
+ * [#448](https://github.com/capistrano/sshkit/pull/448): Fix misbehaving connection eviction loop when disabling connection pooling - [Sebastian Cohnen](https://github.com/tisba)
13
+
10
14
  ## [1.18.1][] (2019-01-26)
11
15
 
12
16
  * [#447](https://github.com/capistrano/sshkit/pull/447): Fix broken thread safety by widening critical section - [Takumasa Ochi](https://github.com/aeroastro)
@@ -754,7 +758,8 @@ version `0.0.5`.
754
758
 
755
759
  First release.
756
760
 
757
- [Unreleased]: https://github.com/capistrano/sshkit/compare/v1.18.1...HEAD
761
+ [Unreleased]: https://github.com/capistrano/sshkit/compare/v1.18.2...HEAD
762
+ [1.18.2]: https://github.com/capistrano/sshkit/compare/v1.18.1...v1.18.2
758
763
  [1.18.1]: https://github.com/capistrano/sshkit/compare/v1.18.0...v1.18.1
759
764
  [1.18.0]: https://github.com/capistrano/sshkit/compare/v1.17.0...v1.18.0
760
765
  [1.17.0]: https://github.com/capistrano/sshkit/compare/v1.16.1...v1.17.0
@@ -21,7 +21,7 @@ end
21
21
 
22
22
  # The ConnectionPool caches connections and allows them to be reused, so long as
23
23
  # the reuse happens within the `idle_timeout` period. Timed out connections are
24
- # closed, forcing a new connection to be used in that case.
24
+ # eventually closed, forcing a new connection to be used in that case.
25
25
  #
26
26
  # Additionally, a background thread is started to check for abandoned
27
27
  # connections that have timed out without any attempt at being reused. These
@@ -46,7 +46,11 @@ class SSHKit::Backend::ConnectionPool
46
46
  @caches = {}
47
47
  @caches.extend(MonitorMixin)
48
48
  @timed_out_connections = Queue.new
49
- Thread.new { run_eviction_loop }
49
+
50
+ # Spin up eviction loop only if caching is enabled
51
+ if cache_enabled?
52
+ Thread.new { run_eviction_loop }
53
+ end
50
54
  end
51
55
 
52
56
  # Creates a new connection or reuses a cached connection (if possible) and
@@ -133,7 +137,7 @@ class SSHKit::Backend::ConnectionPool
133
137
  process_deferred_close
134
138
 
135
139
  # Periodically sweep all Caches to evict stale connections
136
- sleep([idle_timeout, 5].min)
140
+ sleep(5)
137
141
  caches.values.each(&:evict)
138
142
  end
139
143
  end
@@ -1,3 +1,3 @@
1
1
  module SSHKit
2
- VERSION = "1.18.1".freeze
2
+ VERSION = "1.18.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sshkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.1
4
+ version: 1.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Hambley
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-26 00:00:00.000000000 Z
12
+ date: 2019-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-ssh
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  - !ruby/object:Gem::Version
285
285
  version: '0'
286
286
  requirements: []
287
- rubygems_version: 3.0.2
287
+ rubygems_version: 3.0.1
288
288
  signing_key:
289
289
  specification_version: 4
290
290
  summary: SSHKit makes it easy to write structured, testable SSH commands in Ruby