summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-13 14:10:01 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-13 14:10:01 +0100
commitd3d8375e232de4615b49f654b7e2d20c955eee6d (patch)
tree95ec26f6914cb8e32b4b57c923142ca320dd5c8f
parentd481bf8eb1a2c2dcf27e58c82420e3f35b7670eb (diff)
socketengine_select Reset the values in the timeval struct on *nix before select()
-rw-r--r--src/socketengines/socketengine_select.cpp4
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;