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

Protocol errors did not support async error handlers #1790

Closed
wants to merge 3 commits into from

Conversation

Tronic
Copy link
Member

@Tronic Tronic commented Feb 21, 2020

Fix async error handlers which were not being awaited when errors occurred within protocol code (e.g. Payload Too Large).

This appears to be working but I did not review what consequences does it have that server.write_error is now in fact asynchronous.

Issue #1785

@codecov
Copy link

codecov bot commented Feb 21, 2020

Codecov Report

Merging #1790 into master will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1790      +/-   ##
==========================================
+ Coverage   92.08%   92.17%   +0.08%     
==========================================
  Files          23       23              
  Lines        2312     2312              
  Branches      426      426              
==========================================
+ Hits         2129     2131       +2     
+ Misses        141      139       -2     
  Partials       42       42
Impacted Files Coverage Δ
sanic/handlers.py 97.72% <0%> (+2.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91f6aba...091c882. Read the comment docs.

@Tronic
Copy link
Member Author

Tronic commented Feb 21, 2020

A potential problem: since protocol does not await for error response being sent, it might be so that another request gets handled in the middle and the responses get mixed up. Could someone familiar with the protocol code have a look at that?

@Tronic
Copy link
Member Author

Tronic commented Mar 1, 2020

Closing in favour of #1791 where this is properly fixed.

@Tronic Tronic closed this Mar 1, 2020
@Tronic Tronic mentioned this pull request Mar 18, 2020
@Tronic Tronic mentioned this pull request Jun 21, 2020
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