File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -687,7 +687,7 @@ EventMachine_t::_TimeTilNextEvent
687687
688688timeval EventMachine_t::_TimeTilNextEvent ()
689689{
690- // 29jul11: Changed calculation base from MyCurrentLoopTime to the
690+ // 29jul11: Changed calculation base from MyCurrentLoopTime to the
691691 // real time. As MyCurrentLoopTime is set at the beginning of an
692692 // iteration and this calculation is done at the end, evenmachine
693693 // will potentially oversleep by the amount of time the iteration
@@ -709,10 +709,12 @@ timeval EventMachine_t::_TimeTilNextEvent()
709709 if (!NewDescriptors.empty () || !ModifiedDescriptors.empty ()) {
710710 next_event = current_time;
711711 }
712-
712+
713713 timeval tv;
714714
715- if (next_event == 0 || NumCloseScheduled > 0 ) {
715+ if (NumCloseScheduled > 0 || bTerminateSignalReceived) {
716+ tv.tv_sec = tv.tv_usec = 0 ;
717+ } else if (next_event == 0 ) {
716718 tv = Quantum;
717719 } else {
718720 if (next_event > current_time) {
You can’t perform that action at this time.
0 commit comments