Handle #1529 - do not mark normal conn termination as an error

This commit is contained in:
Sergey Lyubka 2022-04-19 20:28:10 +01:00
parent 20fc8f0279
commit 9dd3b75165
2 changed files with 2 additions and 2 deletions

View File

@ -3192,7 +3192,7 @@ static void iolog(struct mg_connection *c, char *buf, long n, bool r) {
if (n == 0) {
// Do nothing
} else if (n < 0) {
mg_error(c, "IO error");
c->is_closing = 1; // Termination. Don't call mg_error(): #1529
} else if (n > 0) {
if (c->is_hexdumping) {
union usa usa;

View File

@ -103,7 +103,7 @@ static void iolog(struct mg_connection *c, char *buf, long n, bool r) {
if (n == 0) {
// Do nothing
} else if (n < 0) {
mg_error(c, "IO error");
c->is_closing = 1; // Termination. Don't call mg_error(): #1529
} else if (n > 0) {
if (c->is_hexdumping) {
union usa usa;