Browse Source

don't close the error log if we didn't open it.

mlamb 15 năm trước cách đây
mục cha
commit
57157edc66
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      mongoose.c

+ 1 - 1
mongoose.c

@@ -477,7 +477,7 @@ cry(struct mg_connection *conn, const char *fmt, ...)
 			(void) fprintf(fp, "%s", buf);
 			fputc('\n', fp);
 			funlockfile(fp);
-			/* (void) fclose(fp); */
+			if (fp != stderr) fclose(fp);
 		}
 	}
 	conn->request_info.log_message = NULL;