1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-09 12:11:02 +00:00

Use no timeout on further reads in avalon_gets

This commit is contained in:
Con Kolivas 2013-04-08 11:22:25 +10:00
parent ad55fbf906
commit af6111fb55

View File

@ -215,7 +215,7 @@ static inline int avalon_gets(int fd, uint8_t *buf, struct thr_info *thr,
timeout.tv_sec = 0;
/* If we get a restart message, still check if there's
* anything in the buffer waiting to be parsed */
if (unlikely(thr->work_restart))
if (unlikely(thr->work_restart || !first))
timeout.tv_usec = 0;
else
timeout.tv_usec = 100000;