Skip to content
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

select() timeout with 5 usecs causes hitches on Windows #16

Open
seanmiddleditch opened this issue Jan 30, 2016 · 2 comments
Open

select() timeout with 5 usecs causes hitches on Windows #16

seanmiddleditch opened this issue Jan 30, 2016 · 2 comments

Comments

@seanmiddleditch
Copy link

webby.c around line 1333:

timeout.tv_sec = 0;
timeout.tv_usec = 5;

err = select((int) (max_socket + 1), &read_fds, &write_fds, &except_fds, &timeout);

I experienced large hitches in the select() call on Windows (VS 2015 Update 1, x64, Windows 10) until I set the tv_usec field to 0 instead of 5. I assume there's a timer granularity difference between the current Winsock libraries and whatever platform Webby has been tested with.

@deplinenoise
Copy link
Owner

Maybe this should be a server config option.

@seanmiddleditch
Copy link
Author

I think that makes sense. I can't personally think of a reason I'd want a timeout at all (even if it didn't cause Windows hitches), but I'm sure you and others have valid use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants