Browse Source

httpd: do not set alarm() timeout if we read cached header

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko 5 years ago
parent
commit
af6012a1a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      networking/httpd.c

+ 1 - 1
networking/httpd.c

@@ -1253,10 +1253,10 @@ static unsigned get_line(void)
 	unsigned count;
 	char c;
 
-	alarm(HEADER_READ_TIMEOUT);
 	count = 0;
 	while (1) {
 		if (hdr_cnt <= 0) {
+			alarm(HEADER_READ_TIMEOUT);
 			hdr_cnt = safe_read(STDIN_FILENO, hdr_buf, sizeof_hdr_buf);
 			if (hdr_cnt <= 0)
 				goto ret;