-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
secure socket receiveTimeout throwing after configured timeout * 2 #3725
Comments
I know that this issue was observed on Ubuntu 2020, but I would like to note that I've also seen a timeout problem with SSL connections on Windows, see #3806 |
This issue is stale because it has been open for 365 days with no activity. |
This issue was closed because it has been inactive for 60 days since being marked as stale. |
@aleks-f , as far as I can see from the code, the timeout is used in One of the naïve possibilities to resolve this is to set the timeout internally to half of the requested value in |
* fix(SecureSocket): Refactor detection of timeout when reading, writing or handshaking. (#3725) * enh(SecureSocket): some trivial C++17 modernisation changes. * chore: indentation and compiler warning * fix(SecureSocketImpl): not thread-safe (1st attempt) #4435 * fix(SecureSocketImpl): silence CodeQL cpp/certificate-not-checked --------- Co-authored-by: Matej Kenda <matejken@gmail.com>
* fix(SecureSocket): Refactor detection of timeout when reading, writing or handshaking. (#3725) * enh(SecureSocket): some trivial C++17 modernisation changes. * chore: indentation and compiler warning * fix(SecureSocketImpl): not thread-safe (1st attempt) #4435 * fix(SecureSocketImpl): silence CodeQL cpp/certificate-not-checked --------- Co-authored-by: Matej Kenda <matejken@gmail.com>
when creating a secure http server, default receiveTimeout for incoming socket is set to 60s. But the timeout is detected after 60*2s.
To reproduce just create a server secure socket, set the timeout to X seconds, call receiveBytes() and observe that the timeout exception is received after X*2s.
Timeout exception shall be received after Xs.
Please add relevant environment information:
ubuntu20
poco-1.11.1-release
Additional context
looking at code you see that SSL_read blocks during Xs, then there is a mustRetry calls that call socket->poll(Xs, READ) which will aslo block Xs, then exc is thrown
The text was updated successfully, but these errors were encountered: