tenderlove / ds9

Wrapper around nghttp2
80 stars 13 forks source link

Support nghttp2_session_get_last_proc_stream_id #3

Closed ganmacs closed 5 years ago

ganmacs commented 5 years ago

Support nghttp2_session_get_last_proc_stream_id. we use it for performing a graceful shutdown.

https://tools.ietf.org/html/rfc7540#section-6.8

A client that is unable to retry requests loses all requests that are in flight when the server closes the connection. This is especially true for intermediaries that might not be serving clients using HTTP/2. A server that is attempting to gracefully shut down a connection SHOULD send an initial GOAWAY frame with the last stream identifier set to 2^31-1 and a NO_ERROR code. This signals to the client that a shutdown is imminent and that initiating further requests is prohibited. After allowing time for any in-flight stream creation (at least one round-trip time), the server can send another GOAWAY frame with an updated last stream identifier. This ensures that a connection can be cleanly shut down without losing requests.

ganmacs commented 5 years ago

Thank you for your quick response 🙏

tenderlove commented 5 years ago

Thank you for your quick response 🙏

No problem. I added you as a committer and also on rubygems.org. Please feel free to commit / release.