|
|
@@ -253,26 +253,26 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- rc++;
|
|
|
- if (rc >= read_count) {
|
|
|
+ if (thr && thr->work_restart) {
|
|
|
if (epollfd != -1)
|
|
|
close(epollfd);
|
|
|
if (opt_debug) {
|
|
|
applog(LOG_DEBUG,
|
|
|
- "Icarus Read: No data in %.2f seconds",
|
|
|
- (float)rc * epoll_timeout / 1000.);
|
|
|
+ "Icarus Read: Interrupted by work restart");
|
|
|
}
|
|
|
- return ICA_GETS_TIMEOUT;
|
|
|
+ return ICA_GETS_RESTART;
|
|
|
}
|
|
|
|
|
|
- if (thr && thr->work_restart) {
|
|
|
+ rc++;
|
|
|
+ if (rc >= read_count) {
|
|
|
if (epollfd != -1)
|
|
|
close(epollfd);
|
|
|
if (opt_debug) {
|
|
|
applog(LOG_DEBUG,
|
|
|
- "Icarus Read: Interrupted by work restart");
|
|
|
+ "Icarus Read: No data in %.2f seconds",
|
|
|
+ (float)rc * epoll_timeout / 1000.);
|
|
|
}
|
|
|
- return ICA_GETS_RESTART;
|
|
|
+ return ICA_GETS_TIMEOUT;
|
|
|
}
|
|
|
}
|
|
|
}
|