Skip to content

Add accessor for http2 handshaking state - #553

Open
arrangabriel wants to merge 1 commit into
elixir-mint:mainfrom
arrangabriel:public-handshaking-accessor
Open

arrangabriel wants to merge 1 commit into
elixir-mint:mainfrom
arrangabriel:public-handshaking-accessor

Conversation

@arrangabriel

Copy link
Copy Markdown

Because Mint.HTTP2.t() is opaque, and open?/2 returns true while the connection is still waiting for the server's connection preface. Callers that need to know whether the HTTP/2 handshake has finished have to match on the struct's internal :state field.

This adds handshaking?/1, an "accessor" like open?/2, which returns true until the server's initial SETTINGS frame arrives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant