async-http 0.30.3 → 0.30.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 988a06a8b08c2251198294138b4bd8a8ef679bf072633b0db804abb3b80424c8
|
4
|
+
data.tar.gz: a923e52d7d7c4b38c32e7db4a49867daad1a6e0d3393fcd524a615f793ebcc95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c03b5e2b487e5071447db19ebb738986a434e121fb26d98676ffd262262682d63e612963ba46b4716de649a3558ea843f92dd2fcceef721d499759343450f077
|
7
|
+
data.tar.gz: 1191e5d82efd60553715e771cf13ddca15348dc7b241ecae2ba546147b6ca344518fef3588203f55f35e3b35886ac6049c1bef5b1e916e37a3c23112073c61bd
|
@@ -47,16 +47,23 @@ module Async
|
|
47
47
|
@reader ||= read_in_background
|
48
48
|
end
|
49
49
|
|
50
|
+
def stop_connection
|
51
|
+
@reader = nil
|
52
|
+
end
|
53
|
+
|
50
54
|
def read_in_background(task: Task.current)
|
51
55
|
task.async do |nested_task|
|
52
56
|
nested_task.annotate("#{version} reading data")
|
53
57
|
|
54
58
|
begin
|
55
|
-
|
59
|
+
# Even thought the connection might be logically closed, we are not done until all HTTP/2 streams are closed or the underlying I/O is closed.
|
60
|
+
while !@stream.closed?
|
56
61
|
self.read_frame
|
57
62
|
end
|
58
63
|
rescue
|
59
64
|
Async.logger.debug(self) {$!}
|
65
|
+
ensure
|
66
|
+
stop_connection
|
60
67
|
end
|
61
68
|
end
|
62
69
|
end
|
@@ -67,7 +74,6 @@ module Async
|
|
67
74
|
|
68
75
|
attr :count
|
69
76
|
|
70
|
-
# Only one simultaneous connection at a time.
|
71
77
|
def multiplex
|
72
78
|
@remote_settings.maximum_concurrent_streams
|
73
79
|
end
|
@@ -47,7 +47,13 @@ module Async
|
|
47
47
|
return request.stream
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
50
|
+
def stop_connection
|
51
|
+
super
|
52
|
+
|
53
|
+
@requests.enqueue nil
|
54
|
+
end
|
55
|
+
|
56
|
+
def receive_requests
|
51
57
|
while request = @requests.dequeue
|
52
58
|
@count += 1
|
53
59
|
|
@@ -56,6 +62,7 @@ module Async
|
|
56
62
|
response = yield(request)
|
57
63
|
rescue
|
58
64
|
request.stream.send_reset_stream(::HTTP::Protocol::HTTP2::INTERNAL_ERROR)
|
65
|
+
|
59
66
|
Async.logger.error(request) {$!}
|
60
67
|
else
|
61
68
|
request.send_response(response)
|
data/lib/async/http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.30.
|
4
|
+
version: 0.30.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|