async-http 0.51.4 → 0.51.5

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: b3d8a95ca9d65332ca021ffd31e28318967b7a7149ca62dc76efdcbd0cc6f2ca
4
- data.tar.gz: 633f435d488d2d8c0dc75e639cffc7ff65aef691dcbf2ac48e022065becebd3f
3
+ metadata.gz: 82358c1bfd502fc8b6c915812c8cfd1f30fe913d4f6d4ba2e83219e7bc5b8c1b
4
+ data.tar.gz: b320500fed1b14c5275848b4154c818a49e40db122e2b434f7c440c58880314d
5
5
  SHA512:
6
- metadata.gz: 800b20b80fb84862ebea60d3b1042cd88b41fa57a6aeeb7f299212dd3448c809285ec75e26c6deb2f9dd2a2439043f2b4d068b55bd9c86b2ea3bd9511e2dae02
7
- data.tar.gz: 26d6ebd8011d8d8abc61e169167ed12b2ea96e9e020f1fefcde490780a4a9157b74e9041e1cb9a7367f8b6072b844544cbb1dc407766fecbeca40788dc4506f8
6
+ metadata.gz: a341003b057838aba42e190b2bfdd47a34089706dd2f35413b53cb921261b131d4af84218449be038ee760fa53c48679d04802b1a5d702e798c633bf526b5fb8
7
+ data.tar.gz: 953b30680ef52830bc14b41c47a954add118fe760d96248307cfefd7264df4131fac0ae2783f15dcf097aafd55a0251ffd0dd7376a86e81953d16e5ea20f95b3
@@ -52,17 +52,18 @@ module Async
52
52
  end
53
53
 
54
54
  def close(error = nil)
55
- # This invokes Framer#close which closes the stream:
56
- super
57
-
58
55
  if @requests
59
56
  # Stop the request loop:
60
- @requests.enqueue nil
57
+ @requests.enqueue(nil)
61
58
  @requests = nil
62
59
  end
60
+
61
+ super
63
62
  end
64
63
 
65
- def each
64
+ def each(task: Task.current)
65
+ task.annotate("#{version} reading requests for #{self.class}.")
66
+
66
67
  # It's possible the connection has died before we get here...
67
68
  @requests&.async do |task, request|
68
69
  task.annotate("Incoming request: #{request.method} #{request.path.inspect}.")
@@ -80,6 +81,8 @@ module Async
80
81
  request.send_response(response)
81
82
  end
82
83
  end
84
+
85
+ # Maybe we should add some synchronisation here - i.e. only exit once all requests are finished.
83
86
  end
84
87
  end
85
88
  end
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Async
24
24
  module HTTP
25
- VERSION = "0.51.4"
25
+ VERSION = "0.51.5"
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.51.4
4
+ version: 0.51.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams