diff --git a/CHANGELOG b/CHANGELOG index 4f703410..6070f392 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -38,6 +38,10 @@ HISTORY ++ Bug fixes: + 2007-02-28 Kieran Mansley + * sockets.c: Fix BUG#19161 - ensure milliseconds timeout is non-zero + when supplied timeout is also non-zero + (STABLE-1.2.0) 2006-12-05 Leon Woestenberg diff --git a/src/api/sockets.c b/src/api/sockets.c index a7c341d6..75539f5c 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -733,8 +733,11 @@ lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, if (timeout == 0) /* Wait forever */ msectimeout = 0; - else + else { msectimeout = ((timeout->tv_sec * 1000) + ((timeout->tv_usec + 500)/1000)); + if(msectimeout == 0) + msectimeout = 1; + } i = sys_sem_wait_timeout(select_cb.sem, msectimeout);