Skip to content

Refined server error handling #937

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

Merged
merged 2 commits into from
May 18, 2022
Merged

Conversation

redboltz
Copy link
Owner

No description provided.

redboltz added 2 commits May 18, 2022 14:55
Exising error handler is for listen and the first accept.
After error handler is called, the server no longer accept.
If user needs to re-accept, call listen().
There is no change from the original behavior.

The new callback is added that takes ioc_context reference parameter.
It can help io_context management when user uses ioc_con_getter.

The error handler stop accept. But TLS/WS has aditionall errors.
For example, timeout after TCP connection has been established.
In this case, just accepted connection is error.
And then continue new accepting sequence.
User shouldn't call listen() in this case.

In order to disstinguish this error, connect_error_handler is added.
@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #937 (4d38bd9) into master (5bff3c8) will decrease coverage by 0.25%.
The diff coverage is 63.82%.

@@            Coverage Diff             @@
##           master     #937      +/-   ##
==========================================
- Coverage   83.32%   83.07%   -0.26%     
==========================================
  Files          66       66              
  Lines       10323    10387      +64     
==========================================
+ Hits         8602     8629      +27     
- Misses       1721     1758      +37     

@redboltz redboltz merged commit 41a6937 into master May 18, 2022
@redboltz redboltz deleted the refined_server_error_handling branch May 18, 2022 09:46
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