Commit a1858022 authored by Jean-Claude BAU's avatar Jean-Claude BAU Committed by Adam Wujek

Optimization timeout generation

- Reset local remaining time-out when 'select' exits due to a signal
parent 2dfd3108
......@@ -624,12 +624,15 @@ static int unix_net_check_packet(struct pp_globals *ppg, int delay_ms)
}
i = select(maxfd + 1, &set, NULL, NULL, &arch_data->tv);
if (i < 0 && errno != EINTR)
exit(__LINE__);
if (i < 0)
return -1;
if ( i < 0 ) {
if ( errno != EINTR )
exit(__LINE__);
else {
arch_data->tv.tv_sec =
arch_data->tv.tv_usec =0;
return -1;
}
}
if (i == 0)
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment