Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make many gun_http2 functions return state or error tuple #301

Closed

Conversation

zuiderkwast
Copy link
Contributor

The following functions used to return a state, but now return {state, State} or {error, Reason}:

  • frame/5
  • update_window/1,2
  • maybe_ack_or_notify/2
  • reset_stream/3
  • push_promise_frame/7
  • goaway/2
  • maybe_send_data/6
  • send_data/4
  • send_data/6
  • send_data_frame/4

This is incremental refactoring preparing for #243

The following functions used to return a state, but now return {state, State}
or {error, Reason}:

* frame/5
* update_window/1,2
* maybe_ack_or_notify/2
* reset_stream/3
* push_promise_frame/7
* goaway/2
* maybe_send_data/6
* send_data/4
* send_data/6
* send_data_frame/4
@zuiderkwast
Copy link
Contributor Author

Good morning Loïc. Are you busy?

I believe when this is merged, the remaining "handle send errors" will be a very small change.

@essen
Copy link
Member

essen commented Oct 3, 2022

Sounds good. Yes if I don't get to this today it will be next Monday.

@zuiderkwast
Copy link
Contributor Author

OK, great. The change is large but trivial, so I hope it is easy to review.

Then, I can help finishing the remaining 2.0 projects, if you know what you want with them. :-)

src/gun_http2.erl Outdated Show resolved Hide resolved
src/gun_http2.erl Outdated Show resolved Hide resolved
@essen
Copy link
Member

essen commented Oct 10, 2022

@zuiderkwast Reviewed. There's at least one error and a couple consistency problems that should easily be resolved.

@essen
Copy link
Member

essen commented Oct 11, 2022

Merged, thanks! I've also fixed the TLS tests that fail. Dialyzer will fail until the other PR is merged.

@essen essen closed this Oct 11, 2022
@zuiderkwast zuiderkwast deleted the http2-funcs-return-commands branch October 11, 2022 16:51
@zuiderkwast zuiderkwast mentioned this pull request Oct 17, 2022
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.

2 participants