-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[core,gateway] use TcpConnectTimeout for read as well #10288
Conversation
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.
clang-tidy made some suggestions
Refer to this link for build results (access rights to CI server needed): |
e64195b
to
fc9f41f
Compare
clang-tidy review says "All clean, LGTM! 👍" |
Refer to this link for build results (access rights to CI server needed): |
fc9f41f
to
44705b9
Compare
clang-tidy review says "All clean, LGTM! 👍" |
Refer to this link for build results (access rights to CI server needed): |
@freerdp-bot test please |
Refer to this link for build results (access rights to CI server needed): |
@freerdp-bot test please |
Refer to this link for build results (access rights to CI server needed): |
44705b9
to
13aa14f
Compare
clang-tidy review says "All clean, LGTM! 👍" |
Refer to this link for build results (access rights to CI server needed): |
@freerdp-bot test please |
Refer to this link for build results (access rights to CI server needed): |
@freerdp-bot test please |
Refer to this link for build results (access rights to CI server needed): |
Hello @akallabeth. Thank you for the pull request. Unfortunately, the changes refuse to let me connect. FreeRDP asks for a redirect URL, and after I pass it on, I get Details
|
@progxaker ok, so it works as intended ;) |
But the AVD instance was off, and I wanted to wait for the auto-reconnect mechanism to start it up automatically. Instead, FreeRDP drops the connection after 15 seconds, i.e., it doesn't wait for the instance is up. |
@progxaker hmm, for that there should be a response from the remote end, see your previous logs with entries like |
Hello @akallabeth. I don't think the timeout parameter helps here. I set it to 20000ms ( Logs
UPD: yes, it looks like. DetailsI added the diff --git a/libfreerdp/core/gateway/http.c b/libfreerdp/core/gateway/http.c
index dce527804..f4ecbed17 100644
--- a/libfreerdp/core/gateway/http.c
+++ b/libfreerdp/core/gateway/http.c
@@ -1240,6 +1240,7 @@ HttpResponse* http_response_recv(rdpTls* tls, BOOL readContentLength)
/* Read until we encounter \r\n\r\n */
ERR_clear_error();
const int wstatus = BIO_wait_read(tls->bio, timeout);
+ WLog_ERR(TAG, "[BIO_wait_read] wstatus: %i", wstatus);
if (wstatus < 0)
{
if (!BIO_should_retry(tls->bio)) and got
P.S. This is also not related to the reconnection mechanism, because in the second attempt (with the log function) AVD was started (by first FreeRDP run). |
http_response_recv might never receive an answer, so do wait for input and fail if the timeout is exceeded.
13aa14f
to
4425772
Compare
@progxaker ok, there was indeed a bug with the timeout handling in the custom |
clang-tidy review says "All clean, LGTM! 👍" |
Refer to this link for build results (access rights to CI server needed): |
BIO_C_WAIT_READ and BIO_C_WAIT_WRITE now set errno = ETIMEDOUT if a timeout occurred.
4425772
to
c4fe6e7
Compare
clang-tidy review says "All clean, LGTM! 👍" |
Refer to this link for build results (access rights to CI server needed): |
http_response_recv might never receive an answer, so do wait for input and fail if the timeout is exceeded.
@progxaker you might test this branch and it should now at least fail with a timeout instead of idling forever