Mercurial > hg > index.cgi
diff src/lwwire.c @ 5:422f5e8fff85
Extend base read timeout to 100ms in spec and implementation.
Reports indicate that 10ms is too short so extending the base timeout to
100ms to compensate.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 29 May 2016 21:59:29 -0600 |
parents | 56f53e48ab50 |
children | cf915ece9e48 |
line wrap: on
line diff
--- a/src/lwwire.c Sun May 29 21:50:51 2016 -0600 +++ b/src/lwwire.c Sun May 29 21:59:29 2016 -0600 @@ -374,7 +374,7 @@ /* Read len bytes from the input. If no bytes are available after -10 ms, return error. +100 ms, return error. This *may* allow a timeout longer than 10ms. However, it will eventually time out. In the worse case, it is more permissive @@ -441,7 +441,7 @@ FD_ZERO(&fdset); FD_SET(0, &fdset); timeout.tv_sec = 0; - timeout.tv_usec = 10000 * itimeout; + timeout.tv_usec = 100000 * itimeout; rv = select(1, &fdset, NULL, NULL, &timeout); if (rv < 0)