async-http 0.37.2 → 0.37.3

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: 5dbed5bd54f5f9472380b5185d95063816802e236550690936b9f36e29eb999d
4
- data.tar.gz: e09eda18d9b7ba0465026346a6ef7f74ac6d6b0595138546bcf4a416ecc682a5
3
+ metadata.gz: 56a31caa730c93d06b5a39bf8cc63854cbca765c95e31e695cf5c1b8d857fa39
4
+ data.tar.gz: 0db37799fe6cba5b48c21a03d07495eee884ef3794e8a780b7a894e9e4158856
5
5
  SHA512:
6
- metadata.gz: f71b8dc614deb0fd9df31b644d20be9d0456b8d2a385ce1c6d401062798aef1a7001d732c46684d099b7cf7050fb692efac1eba2d1b506a85b48d8e333c1ea66
7
- data.tar.gz: 9024411cc22300c5d8a03775d14ea6e17b598b851c3570a0971ec2f3f75a9c7921e90700e32e45be4735682e9b63bf9f800f058ad6e0693c49681af93dc62831
6
+ metadata.gz: 1fa80b157905d027133f010e822b18c20f11062dcde3ea16c0bf59047ad56c41cbd7f153c7f230617e07b7b9273e45f32c49951ea6223e36edc14ca1b1671751
7
+ data.tar.gz: '0390df8738ec66d930cf4214e3ad1b0cc36fbfda468c889c602c779beb513bef607557eda90decbf26bff7ca500d3282a777df29c698c897222d0dcdfb0a40be'
@@ -0,0 +1,6 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = tab
5
+ indent_size = 2
6
+
data/Rakefile CHANGED
@@ -29,7 +29,7 @@ task :google do
29
29
  framer = ::HTTP::Protocol::HTTP2::Framer.new(stream)
30
30
  client = ::HTTP::Protocol::HTTP2::Client.new(framer)
31
31
 
32
- client.send_connection_preface([])
32
+ client.send_connection_preface
33
33
 
34
34
  stream = ::HTTP::Protocol::HTTP2::Stream.new(client)
35
35
 
@@ -90,6 +90,7 @@ module Async
90
90
  def read
91
91
  return if @stream.finished?
92
92
 
93
+ # The stream might have been closed while waiting for the chunk to come in.
93
94
  if chunk = super
94
95
  @input_length += chunk.bytesize
95
96
 
@@ -98,7 +99,7 @@ module Async
98
99
  @output_length += chunk.bytesize
99
100
 
100
101
  return chunk
101
- else
102
+ elsif !@stream.closed?
102
103
  chunk = @stream.finish
103
104
 
104
105
  @output_length += chunk.bytesize
@@ -33,6 +33,7 @@ module Async
33
33
  def read
34
34
  return if @stream.finished?
35
35
 
36
+ # The stream might have been closed while waiting for the chunk to come in.
36
37
  if chunk = super
37
38
  @input_length += chunk.bytesize
38
39
 
@@ -40,7 +41,7 @@ module Async
40
41
  chunk = @stream.inflate(chunk)
41
42
 
42
43
  @output_length += chunk.bytesize
43
- else
44
+ elsif !@stream.closed?
44
45
  chunk = @stream.finish
45
46
 
46
47
  @output_length += chunk.bytesize
@@ -55,6 +55,10 @@ module Async
55
55
  def read
56
56
  @body.read
57
57
  end
58
+
59
+ def inspect
60
+ @body.inspect
61
+ end
58
62
  end
59
63
  end
60
64
  end
@@ -41,7 +41,9 @@ module Async
41
41
 
42
42
  def send_body(body, task: Async::Task.current)
43
43
  # TODO Might need to stop this task when body is cancelled.
44
- @task = task.async do
44
+ @task = task.async do |subtask|
45
+ subtask.annotate "Sending body: #{body.class}"
46
+
45
47
  @body = body
46
48
 
47
49
  window_updated
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module HTTP
23
- VERSION = "0.37.2"
23
+ VERSION = "0.37.3"
24
24
  end
25
25
  end
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.37.2
4
+ version: 0.37.3
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-11-10 00:00:00.000000000 Z
11
+ date: 2018-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -129,6 +129,7 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ".editorconfig"
132
133
  - ".gitignore"
133
134
  - ".rspec"
134
135
  - ".travis.yml"