Skip to content

Commit

Permalink
Merge pull request #577 from lukase/master
Browse files Browse the repository at this point in the history
Windows HTTP timeout workaround
  • Loading branch information
nomis52 committed Dec 16, 2014
2 parents 3f007bf + 7ecf725 commit b3836a9
Showing 1 changed file with 6 additions and 0 deletions.
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(Lukas) investigate why the poller does not wake up on HTTP requests.
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

0 comments on commit b3836a9

Please sign in to comment.