Fixes bug reported on lwip-users by Florian Zschocke on 13-06-2003 16:07.

The lwip_select() could truncate the timeout to become 0 (wait forever).
This commit is contained in:
likewise 2003-06-17 14:04:54 +00:00
parent 9e513a7bf0
commit d717d627c2

View File

@ -723,7 +723,7 @@ lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset,
/* Wait forever */
msectimeout = 0;
else
msectimeout = ((timeout->tv_sec * 1000) + (timeout->tv_usec /1000));
msectimeout = ((timeout->tv_sec * 1000) + ((timeout->tv_usec + 500)/1000));
i = sys_sem_wait_timeout(select_cb.sem, msectimeout);