ostinelli / net-http2

NetHttp2 is an HTTP/2 client for Ruby.
MIT License
141 stars 31 forks source link

streams timing out when connection is closed #52

Open akostadinov opened 11 months ago

akostadinov commented 11 months ago

Hello, I'm doing 5 threads requesting data on a HTTP/2 connection.

The server often closes the connection and I have a handler to print when this happens. So I see in console this:

#<SocketError: Socket was remotely closed>

But then the outstanding requests are not interrupted. Rather they seem to stay until timeout occurs. So after awhile I see this in console:

#<NoMethodError: undefined method `body' for nil:NilClass>
#<NoMethodError: undefined method `body' for nil:NilClass>
#<NoMethodError: undefined method `body' for nil:NilClass>

i.e. from the 5 threads, 3 were stuck in the request. Nothing raised. Just response was nil instead of an actual response.

So the issues are two:

Matchlighter commented 10 months ago

https://github.com/ostinelli/net-http2/pull/47