protocol-http2 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/protocol/http2/connection.rb +10 -1
- data/lib/protocol/http2/stream.rb +2 -0
- data/lib/protocol/http2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 868932fdb503f3fb6cc3fed243af7019b56e24bb1ac56a42e69132e0dad1af41
|
4
|
+
data.tar.gz: fb965bc65c34b0ad14f10985c0f21676e1b9a9ceab1052d7482635d5542f461b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f8197a22080d609c376e48fd4019aa751b9cf2b845c7d5c9d5f3917e349a09a3ea14d256cac36e815d7126ad72c95a268f754884db200eed006e2f6400d450
|
7
|
+
data.tar.gz: a9cf712bc5eee80c7d77f3628e7df163b3c253a5910358534d52910f13064b5c197ca815eb248483be429544f2cff0af0ce8a540172143eb44bea2f53223a6f3
|
@@ -31,6 +31,7 @@ module Protocol
|
|
31
31
|
def initialize(framer, local_stream_id)
|
32
32
|
@state = :new
|
33
33
|
@streams = {}
|
34
|
+
@closed = 0
|
34
35
|
|
35
36
|
@framer = framer
|
36
37
|
@local_stream_id = local_stream_id
|
@@ -79,6 +80,14 @@ module Protocol
|
|
79
80
|
@state == :closed
|
80
81
|
end
|
81
82
|
|
83
|
+
def stream_closed(stream)
|
84
|
+
@closed += 1
|
85
|
+
end
|
86
|
+
|
87
|
+
def active_stream_count
|
88
|
+
@streams.size - @closed
|
89
|
+
end
|
90
|
+
|
82
91
|
def connection_error!(error, message)
|
83
92
|
return if @framer.closed?
|
84
93
|
|
@@ -327,7 +336,7 @@ module Protocol
|
|
327
336
|
if stream = @streams[frame.stream_id]
|
328
337
|
stream.receive_headers(frame)
|
329
338
|
else
|
330
|
-
if
|
339
|
+
if self.active_stream_count < self.maximum_concurrent_streams
|
331
340
|
stream = accept_stream(frame.stream_id)
|
332
341
|
stream.receive_headers(frame)
|
333
342
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: protocol-hpack
|