-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
https downloader timeout on win/mac #18935
Conversation
It is hard to refer to 404 page :(. |
cocos/network/CCDownloader-curl.cpp
Outdated
@@ -518,7 +521,7 @@ namespace cocos2d { namespace network { | |||
timeout.tv_sec = timeoutMS / 1000; | |||
timeout.tv_usec = (timeoutMS % 1000) * 1000; | |||
|
|||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); | |||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, 50); |
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.
what's the meaning of number 50 ?
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.
my mistake :(
I think it's better to add some description to explain what happened and what solved. @PatriceJiang |
it is a similar PR as cocos/engine-native#1382 . @minggo |
timeout error occurs when trying to download HTTPS content on windows.
the original polling
sleep
(delay) time is too long and should be separated fromselect
timeout.