biryani 0.0.3 → 0.0.4
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 +4 -4
- data/lib/biryani/connection.rb +3 -4
- data/lib/biryani/streams_context.rb +5 -1
- data/lib/biryani/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ccf97951b31acac8912b7286f6377dedae6e404aab32e8c0eb619ef223d7349
|
|
4
|
+
data.tar.gz: 94563414ccb1a066ca85a9dc553541ea3772bc398e3d80a970e9f26b68d7f31b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5e5cf9d6fc22cfe738483638b414bf0a82575030d9b4c0e400d5beab27da13b5b826390b563b972eca7fca8f5cbc44e8f693bf44abeab6eb360d9b09a91a3bd
|
|
7
|
+
data.tar.gz: f961a868e92ba46f300784f12568b0cd47cebc1cda484008b870480c22f63d5de66bf3d76fcddcbc96e192179c2d493a0fb1fbfc0b6cc189ba2852ee99af009a
|
data/lib/biryani/connection.rb
CHANGED
|
@@ -102,10 +102,9 @@ module Biryani
|
|
|
102
102
|
max_frame_size = @peer_settings[SettingsID::SETTINGS_MAX_FRAME_SIZE]
|
|
103
103
|
self.class.send_headers(io, stream_id, fragment, data.empty?, max_frame_size, @streams_ctx)
|
|
104
104
|
self.class.send_data(io, stream_id, data, @send_window, max_frame_size, @streams_ctx, @data_buffer) unless data.empty?
|
|
105
|
-
|
|
106
|
-
@streams_ctx.remove_closed(@data_buffer)
|
|
107
105
|
end
|
|
108
106
|
|
|
107
|
+
@streams_ctx.remove_closed(@data_buffer)
|
|
109
108
|
break if closed?
|
|
110
109
|
end
|
|
111
110
|
end
|
|
@@ -349,7 +348,7 @@ module Biryani
|
|
|
349
348
|
if recv_window.consume!(data.bytesize).negative? || ctx.recv_window.consume!(data.bytesize).negative?
|
|
350
349
|
|
|
351
350
|
ctx.content << data
|
|
352
|
-
if ctx.
|
|
351
|
+
if ctx.half_closed_remote?
|
|
353
352
|
obj = http_request(ctx.fragment.string, ctx.content.string, decoder)
|
|
354
353
|
return obj if Biryani.err?(obj)
|
|
355
354
|
|
|
@@ -370,7 +369,7 @@ module Biryani
|
|
|
370
369
|
# @return [nil, ConnectionError]
|
|
371
370
|
def self.handle_headers(headers, ctx, decoder)
|
|
372
371
|
ctx.fragment << headers.fragment
|
|
373
|
-
if ctx.
|
|
372
|
+
if ctx.half_closed_remote?
|
|
374
373
|
obj = http_request(ctx.fragment.string, ctx.content.string, decoder)
|
|
375
374
|
return [obj] if Biryani.err?(obj)
|
|
376
375
|
|
|
@@ -84,7 +84,6 @@ module Biryani
|
|
|
84
84
|
closed_ids = closed_stream_ids.filter { |id| !data_buffer.has?(id) }
|
|
85
85
|
closed_ids.each do |id|
|
|
86
86
|
@h[id].tx.close
|
|
87
|
-
@h[id].stream.rx << nil
|
|
88
87
|
@h[id].fragment.close
|
|
89
88
|
@h[id].content.close
|
|
90
89
|
end
|
|
@@ -131,5 +130,10 @@ module Biryani
|
|
|
131
130
|
def active?
|
|
132
131
|
@state.active?
|
|
133
132
|
end
|
|
133
|
+
|
|
134
|
+
# @return [Boolean]
|
|
135
|
+
def half_closed_remote?
|
|
136
|
+
@state.half_closed_remote?
|
|
137
|
+
end
|
|
134
138
|
end
|
|
135
139
|
end
|
data/lib/biryani/version.rb
CHANGED