Browse Source

Merge commit '4ba6cba' into cg_merges_20130602

Conflicts:
	driver-icarus.c
Luke Dashjr 12 years ago
parent
commit
d70c188145
1 changed files with 7 additions and 7 deletions
  1. 7 7
      driver-icarus.c

+ 7 - 7
driver-icarus.c

@@ -250,13 +250,6 @@ 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);
@@ -278,6 +271,13 @@ 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;
+		}
 	}
 }