| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -226,10 +226,10 @@ bool HTTPConnection::canReadData() { | |||
| 226 | 226 | FD_ZERO( &sockfds ); | |
| 227 | 227 | FD_SET(_socket, &sockfds); | |
| 228 | 228 | ||
| 229 | - // We define an immediate timeout (return immediately, if there's no data) | ||
| 229 | + // Wait up to 250 ms for data to be available before returning false | ||
| 230 | 230 | timeval timeout; | |
| 231 | - timeout.tv_sec = 1; | ||
| 232 | - timeout.tv_usec = 0; | ||
| 231 | + timeout.tv_sec = 0; | ||
| 232 | + timeout.tv_usec = 250000; | ||
| 233 | 233 | ||
| 234 | 234 | // Check for input | |
| 235 | 235 | // As by 2017-12-14, it seems that FD_SETSIZE is defined as 0x40, but socket IDs now | |
| Back | FazBrowse Home | New Git URL |
0 commit comments