httpx 0.20.0 → 0.20.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5a31aeffa012bd1eea19c1e892c8669624de0d21c9cd8911ae025375f0b93fb
4
- data.tar.gz: 285707682eb2d1451106d28bc2d4a8ceb247d4237139c9e7d83bd5a0163b5a5c
3
+ metadata.gz: 2d7bcf0e6c97e369caf28c209d551d4f9667745b6a6a530ae2efd328c611e0e5
4
+ data.tar.gz: 822c0437afcefb35e7d4319f91e71c5b4c81720bd0d7a7763db1d1f8bfbc4b1a
5
5
  SHA512:
6
- metadata.gz: 6f2c50aa8895c6f07ed0acbca1b1171343da2b55bc838ae7f2a0f7a44300c101ea0020938946bf630b80ad6b81bed3cb54910b0734576b6e7c000e058497128c
7
- data.tar.gz: 83e19a86d841056821d9198c9a8e3e7b06ec354445289a1fd7d612d070b02b0a01aa9f45f5acdb0b35e4da413c2c3955646e5f55c5421db95879092a0a3aa377
6
+ metadata.gz: 747e7d2ca2a4aee92f1774473e9b38565fec3879ee6b6d0ab3c4eeb1313740c6bbd3648c8c6f21b40903f4bf9bc842647b531968debcda747652afb483577b11
7
+ data.tar.gz: 88d3bafe38437bebb42960d980dddc85e9e12a917c492203744ded3f93c79736feedf839604cd1a4b080a59c64c96c26c545808cc29d19bcdaa93fa55154bbef
@@ -1,4 +1,4 @@
1
- # 0.19.7
1
+ # 0.19.8
2
2
 
3
3
  ## Bugfixes
4
4
 
@@ -1,4 +1,4 @@
1
- # 0.19.0
1
+ # 0.20.0
2
2
 
3
3
  ## Features
4
4
 
@@ -0,0 +1,5 @@
1
+ # 0.20.1
2
+
3
+ ## Bugfixes
4
+
5
+ * bugfix for unregistering connections when timing out on DNS resolving; this wasn't happening, leaving a few cases where requests to the same domain timing out on resolution would hang on the second request.
data/lib/httpx/pool.rb CHANGED
@@ -80,6 +80,9 @@ module HTTPX
80
80
  connection.on(:activate) do
81
81
  select_connection(connection)
82
82
  end
83
+ connection.on(:close) do
84
+ unregister_connection(connection)
85
+ end
83
86
  end
84
87
 
85
88
  def deactivate(connections)
@@ -143,8 +146,6 @@ module HTTPX
143
146
 
144
147
  def on_resolver_error(connection, error)
145
148
  connection.emit(:error, error)
146
- # must remove connection by hand, hasn't been started yet
147
- unregister_connection(connection)
148
149
  end
149
150
 
150
151
  def on_resolver_close(resolver)
@@ -171,8 +172,7 @@ module HTTPX
171
172
 
172
173
  def unregister_connection(connection)
173
174
  @connections.delete(connection)
174
- deselect_connection(connection)
175
- @connected_connections -= 1
175
+ @connected_connections -= 1 if deselect_connection(connection)
176
176
  end
177
177
 
178
178
  def select_connection(connection)
data/lib/httpx/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTTPX
4
- VERSION = "0.20.0"
4
+ VERSION = "0.20.1"
5
5
  end
data/sig/pool.rbs CHANGED
@@ -36,9 +36,9 @@ module HTTPX
36
36
 
37
37
  def unregister_connection: (Connection) -> void
38
38
 
39
- def select_connection: (Resolver::Resolver | Connection connection) -> void
39
+ def select_connection: (Selector::selectable) -> void
40
40
 
41
- def deselect_connection: (Resolver::Resolver | Connection connection) -> void
41
+ def deselect_connection: (Selector::selectable) -> Selector::selectable?
42
42
 
43
43
  def coalesce_connections: (Connection coalescable, Connection coalescing) -> void
44
44
 
data/sig/selector.rbs CHANGED
@@ -7,7 +7,7 @@ module HTTPX
7
7
  @selectables: Array[selectable]
8
8
 
9
9
  def register: (selectable io) -> void
10
- def deregister: (selectable io) -> void
10
+ def deregister: (selectable io) -> selectable?
11
11
 
12
12
  def select: (Numeric? interval) { (selectable) -> void } -> void
13
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-31 00:00:00.000000000 Z
11
+ date: 2022-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-2-next
@@ -81,6 +81,7 @@ extra_rdoc_files:
81
81
  - doc/release_notes/0_19_8.md
82
82
  - doc/release_notes/0_1_0.md
83
83
  - doc/release_notes/0_20_0.md
84
+ - doc/release_notes/0_20_1.md
84
85
  - doc/release_notes/0_2_0.md
85
86
  - doc/release_notes/0_2_1.md
86
87
  - doc/release_notes/0_3_0.md
@@ -154,6 +155,7 @@ files:
154
155
  - doc/release_notes/0_19_8.md
155
156
  - doc/release_notes/0_1_0.md
156
157
  - doc/release_notes/0_20_0.md
158
+ - doc/release_notes/0_20_1.md
157
159
  - doc/release_notes/0_2_0.md
158
160
  - doc/release_notes/0_2_1.md
159
161
  - doc/release_notes/0_3_0.md