diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-02-13 14:10:01 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-02-13 14:10:01 +0100 |
commit | d3d8375e232de4615b49f654b7e2d20c955eee6d (patch) | |
tree | 95ec26f6914cb8e32b4b57c923142ca320dd5c8f /src/socketengines | |
parent | d481bf8eb1a2c2dcf27e58c82420e3f35b7670eb (diff) |
socketengine_select Reset the values in the timeval struct on *nix before select()
Diffstat (limited to 'src/socketengines')
-rw-r--r-- | src/socketengines/socketengine_select.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp index c21b200c2..0b5abaf30 100644 --- a/src/socketengines/socketengine_select.cpp +++ b/src/socketengines/socketengine_select.cpp @@ -132,7 +132,9 @@ void SelectEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask) int SelectEngine::DispatchEvents() { - static timeval tval = { 1, 0 }; + timeval tval; + tval.tv_sec = 1; + tval.tv_usec = 0; fd_set rfdset = ReadSet, wfdset = WriteSet, errfdset = ErrSet; |