From d3d8375e232de4615b49f654b7e2d20c955eee6d Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Thu, 13 Feb 2014 14:10:01 +0100 Subject: socketengine_select Reset the values in the timeval struct on *nix before select() --- src/socketengines/socketengine_select.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/socketengines/socketengine_select.cpp') 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; -- cgit v1.2.3