-
Notifications
You must be signed in to change notification settings - Fork 24
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
Timeouts in operations with sockets #417
Conversation
30f920d
to
83e4230
Compare
615308d
to
cecad10
Compare
438b259
to
3ef1267
Compare
3ef1267
to
c479ce0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noted a few minor things to look at. I do have some doubts about passing an io_context as a parameter to methods of a class that already received one in their constructors, we should find a way to improve this. Also, if the timeout is not configurable, I would take it out from the parameters list of each method or at least, since it is always the same value, to add it as a constructor parameter or with a set method so we don't need to repeat it so much (at the moment I cannot think of a case where we want to call each method with different timeouts).
a7b2840
to
99e5f33
Compare
a790555
to
240667e
Compare
7b54435
to
4338db6
Compare
- Modifies HttpSocket class - Modifies HttpsSocket class AsyncConnect() AsyncWrite() AsyncRead() Adds helper functions to http_client_utils.hpp and cpp since they will be shared by both sockets.
Add endpoint to logs Set timeout logs to Debug
4338db6
to
bc2cbee
Compare
Description
This PR adds timeouts to socket operations that can block the process/co_routine indefinitely.