This reverts commit d70c1881452105930dc599291b92b6622414e7b7, reversing changes made to 2cc7b9e1be99899606f286d007e8e39002f3b02d.
@@ -250,6 +250,13 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
return ICA_GETS_OK;
}
+ if (ret > 0) {
+ buf += ret;
+ read_amount -= ret;
+ first = false;
+ continue;
+ }
+
if (thr && thr->work_restart) {
if (epollfd != -1)
close(epollfd);
@@ -271,13 +278,6 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
return ICA_GETS_TIMEOUT;
-
- if (ret > 0) {
- buf += ret;
- read_amount -= ret;
- first = false;
- continue;
- }