mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-12-10 08:46:40 +08:00
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:
parent
9e513a7bf0
commit
d717d627c2
@ -723,7 +723,7 @@ lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset,
|
|||||||
/* Wait forever */
|
/* Wait forever */
|
||||||
msectimeout = 0;
|
msectimeout = 0;
|
||||||
else
|
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);
|
i = sys_sem_wait_timeout(select_cb.sem, msectimeout);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user