|
|
@@ -235,23 +235,23 @@ static int avalon_gets(int fd, uint8_t *buf, int read_count,
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- rc++;
|
|
|
- if (rc >= read_count) {
|
|
|
+ if (thr && thr->work_restart) {
|
|
|
if (opt_debug) {
|
|
|
applog(LOG_WARNING,
|
|
|
- "Avalon: No data in %.2f seconds",
|
|
|
- (float)rc/(float)AVALON_TIME_FACTOR);
|
|
|
+ "Avalon: Work restart at %.2f seconds",
|
|
|
+ (float)(rc)/(float)AVALON_TIME_FACTOR);
|
|
|
}
|
|
|
- return AVA_GETS_TIMEOUT;
|
|
|
+ return AVA_GETS_RESTART;
|
|
|
}
|
|
|
|
|
|
- if (thr && thr->work_restart) {
|
|
|
+ rc++;
|
|
|
+ if (rc >= read_count) {
|
|
|
if (opt_debug) {
|
|
|
applog(LOG_WARNING,
|
|
|
- "Avalon: Work restart at %.2f seconds",
|
|
|
- (float)(rc)/(float)AVALON_TIME_FACTOR);
|
|
|
+ "Avalon: No data in %.2f seconds",
|
|
|
+ (float)rc/(float)AVALON_TIME_FACTOR);
|
|
|
}
|
|
|
- return AVA_GETS_RESTART;
|
|
|
+ return AVA_GETS_TIMEOUT;
|
|
|
}
|
|
|
}
|
|
|
}
|