File tree Expand file tree Collapse file tree 2 files changed +5
-18
lines changed
lib/async/http/protocol/http2 Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
2929 spec . add_dependency "async-pool" , ">= 0.6.1"
3030 spec . add_dependency "protocol-http" , "~> 0.26.0"
3131 spec . add_dependency "protocol-http1" , "~> 0.19.0"
32- spec . add_dependency "protocol-http2" , "~> 0.16 .0"
32+ spec . add_dependency "protocol-http2" , "~> 0.17 .0"
3333 spec . add_dependency "traces" , ">= 0.10.0"
3434end
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ def initialize(*)
3535 @write_frame_guard = Async ::Semaphore . new ( 1 )
3636 end
3737
38+ def synchronize ( &block )
39+ @write_frame_guard . acquire ( &block )
40+ end
41+
3842 def to_s
3943 "\# <#{ self . class } #{ @count } requests, #{ @streams . count } active streams>"
4044 end
@@ -72,23 +76,6 @@ def close(error = nil)
7276 end
7377 end
7478
75- def write_frame ( frame )
76- # We don't want to write multiple frames at the same time.
77- @write_frame_guard . acquire do
78- super
79- end
80-
81- @stream . flush
82- end
83-
84- def write_frames ( &block )
85- @write_frame_guard . acquire do
86- super
87- end
88-
89- @stream . flush
90- end
91-
9279 def read_in_background ( parent : Task . current )
9380 raise RuntimeError , "Connection is closed!" if closed?
9481
You can’t perform that action at this time.
0 commit comments