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

Windows HTTP timeout workaround #577

Merged
merged 3 commits into from
Dec 16, 2014
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions common/http/HTTPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,14 @@ void *HTTPServer::Run() {

OLA_INFO << "HTTP Server started on port " << m_port;

#ifdef _WIN32
// set a short poll interval since we'd block too long otherwise.
// TODO(LE) investigate why the poller does not wake up on HTTP requests.
Copy link
Member

Choose a reason for hiding this comment

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

We've generally gone for TODO(firstname) rather than initials.

m_select_server.SetDefaultInterval(TimeInterval(1, 0));
#else
// set a long poll interval so we don't spin
m_select_server.SetDefaultInterval(TimeInterval(60, 0));
#endif
m_select_server.Run();

// clean up any remaining sockets
Expand Down