Skip to content

select: always use Sleep in Curl_wait_ms on Win32 - #5489

Closed
mback2k wants to merge 1 commit into
curl:masterfrom
mback2k:select-sleep-win32
Closed

select: always use Sleep in Curl_wait_ms on Win32#5489
mback2k wants to merge 1 commit into
curl:masterfrom
mback2k:select-sleep-win32

Conversation

@mback2k

@mback2k mback2k commented May 30, 2020

Copy link
Copy Markdown
Member

Since Win32 almost always will also have USE_WINSOCK,
we can reduce complexity and always use Sleep there.

Suggested-by: Jay Satiro

Follow up to #5343

@mback2k mback2k added Windows Windows-specific tidy-up labels May 30, 2020
@mback2k
mback2k requested review from bagder and jay May 30, 2020 09:14
@mback2k mback2k self-assigned this May 30, 2020
@mback2k
mback2k force-pushed the select-sleep-win32 branch from 5c0f7c8 to 93a2c02 Compare May 30, 2020 09:15

@jay jay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that ULONG_MAX < INFINITE check seems unnecessary you could just do it as ULONG_MAX -1/

Since Win32 almost always will also have USE_WINSOCK,
we can reduce complexity and always use Sleep there.

Suggested-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro

Follow up to curl#5343
Closes curl#5489
@mback2k
mback2k force-pushed the select-sleep-win32 branch from 93a2c02 to 739adbc Compare May 31, 2020 18:34
@mback2k

mback2k commented May 31, 2020

Copy link
Copy Markdown
Member Author

that ULONG_MAX < INFINITE check seems unnecessary you could just do it as ULONG_MAX -1/

Please take another look. I just updated this PR to work regardless of ULONG_MAX and INFINITE being equal or not. I think this one should be more robust now.

@mback2k
mback2k requested review from bagder and jay May 31, 2020 18:35
Comment thread lib/select.c
@mback2k mback2k closed this in 5325b92 Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tidy-up Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

3 participants