patient_http 1.1.0 → 1.1.1

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: bf333a4e860c7ec2acbabd0b2d99b050a2574fd3fe97e7d9cb10b5ba08868fed
4
- data.tar.gz: ea8fdac974792444d4f82ded653beeb644d39a58a88b2c1d7796029266dd0e39
3
+ metadata.gz: dbb8a32f746745abcfd6728c31f6460793440abc3b5bf42f4e0702b7cdd2987e
4
+ data.tar.gz: 482823627d13df33a1a262341c2dd2f8512d466f595edbb2414c573d96d7cd8d
5
5
  SHA512:
6
- metadata.gz: 1ca730c46c12d7be338959fbb45b4c0863e7b81fc2c09ec43aa5e27f073cf4e6023df63441ffc7fa4b244e7fe560a26041872fc4013ed8dfaf8dfdd5b9390fb4
7
- data.tar.gz: 4073af1b84aac90f73e41efaded611eff0c46d2521221eedcdbb3dd640269d4fcf2865cb881e88134897825adc0899b022cf9ca041d0ec3a4818c93fade351f3
6
+ metadata.gz: 1e31bfe3ec727df7c534a93b74c4bb66ee36e45b5ba587fb11751198f360d82d9d0ca01ac43c186244bf5b125f73cfb7588e1e438508124f0c25000bdb7b3e42
7
+ data.tar.gz: 573b8de414ef3ca0251b7cbb946c33f7e9a4a24eeefa1f54823f8c86454243998a3517935f8dc9612c4f61bcc4a1d7d778d7df5ab74c33cbaad47614d26cf96a
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 1.1.1
8
+
9
+ ### Fixed
10
+
11
+ - Connection pools are now closed gracefully inside the reactor during shutdown. Previously the reactor stopped with open pools, causing async-pool to force-cancel each connection pool's background gardener task mid-wait and emit a noisy (but harmless) `ThreadError: Attempt to unlock a mutex which is not locked` warning when the process was killed.
12
+
7
13
  ## 1.1.0
8
14
 
9
15
  ### Added
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -328,6 +328,17 @@ module PatientHttp
328
328
  @config.logger&.info("[PatientHttp] Reactor received stop signal")
329
329
  rescue => e
330
330
  @config.logger&.error("[PatientHttp] Reactor loop error: #{e.inspect}\n#{e.backtrace.join("\n")}")
331
+ ensure
332
+ # Close the HTTP connection pools while still inside the reactor so the
333
+ # pools' background gardener tasks shut down gracefully. Otherwise the
334
+ # reactor stops with open pools and async-pool force-cancels each
335
+ # gardener mid-wait, emitting a noisy (but harmless) ThreadError:
336
+ # "Attempt to unlock a mutex which is not locked".
337
+ begin
338
+ @http_client.close
339
+ rescue => e
340
+ @config.logger&.error("[PatientHttp] Error closing HTTP client: #{e.inspect}")
341
+ end
331
342
  end
332
343
  end
333
344
 
data/lib/patient_http.rb CHANGED
@@ -307,8 +307,8 @@ module PatientHttp
307
307
  if missing_keywords.any?
308
308
  raise ArgumentError.new(
309
309
  "Handler must accept keyword arguments: " \
310
- "#{required_keywords.map(&:to_s).join(", ")}. " \
311
- "Missing: #{missing_keywords.map(&:to_s).join(", ")}"
310
+ "#{required_keywords.join(", ")}. " \
311
+ "Missing: #{missing_keywords.join(", ")}"
312
312
  )
313
313
  end
314
314
 
@@ -321,7 +321,7 @@ module PatientHttp
321
321
 
322
322
  raise ArgumentError.new(
323
323
  "Handler must not have extra required keyword parameters. " \
324
- "Found: #{extra_required_keywords.map(&:to_s).join(", ")}"
324
+ "Found: #{extra_required_keywords.join(", ")}"
325
325
  )
326
326
  end
327
327
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patient_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Durand