File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
spec . require_paths = [ "lib" ]
18
18
19
19
spec . add_dependency ( "async" , "~> 1.6" )
20
- spec . add_dependency ( "async-io" , "~> 1.7 " )
20
+ spec . add_dependency ( "async-io" , "~> 1.8 " )
21
21
22
22
spec . add_dependency ( "http-2" , "~> 0.9.0" )
23
23
# spec.add_dependency("openssl")
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ module Async
24
24
module HTTP
25
25
module Body
26
26
class Fixed < Readable
27
- CHUNK_SIZE = 1024 *8
28
-
29
27
def initialize ( stream , length )
30
28
@stream = stream
31
29
@length = length
@@ -38,9 +36,7 @@ def empty?
38
36
39
37
def read
40
38
if @remaining > 0
41
- amount = [ @remaining , CHUNK_SIZE ] . min
42
-
43
- if chunk = @stream . read ( amount )
39
+ if chunk = @stream . read_partial ( @remaining )
44
40
@remaining -= chunk . bytesize
45
41
46
42
return chunk
You can’t perform that action at this time.
0 commit comments