Fixing socket startup.

This commit is contained in:
Ben Vanik 2015-07-25 12:25:15 -07:00
parent 219eae2b2a
commit 8ce6765233
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ class Win32Socket : public Socket {
// Create event and bind to the socket, waiting for read/close // Create event and bind to the socket, waiting for read/close
// notifications. // notifications.
event_ = xe::threading::Event::CreateManualResetEvent(false); // Set true to start so we'll force a query of the socket on first run.
event_ = xe::threading::Event::CreateManualResetEvent(true);
WSAEventSelect(socket_, event_->native_handle(), FD_READ | FD_CLOSE); WSAEventSelect(socket_, event_->native_handle(), FD_READ | FD_CLOSE);
// Keepalive for a looong time, as we may be paused by the debugger/etc. // Keepalive for a looong time, as we may be paused by the debugger/etc.