Merge pull request #3731 from cesanta/iserror

close connection besides logging, when gateway is down
This commit is contained in:
Sergio R. Caprile authored and GitHub committed 2026-10-12 17:52:09 -03:00
commit bc5afa4519
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -10755,7 +10755,7 @@ void mg_connect_resolved(struct mg_connection *c) {
memcpy(s->mac, ifp->gw6mac, sizeof(s->mac));
l2addr_resolved(c);
} else {
MG_ERROR(("No IPv6 gateway, can't connect"));
mg_error(c, "No IPv6 gateway, can't connect");
}
#endif
} else {
@@ -10771,7 +10771,7 @@ void mg_connect_resolved(struct mg_connection *c) {
memcpy(s->mac, ifp->gwmac, sizeof(s->mac));
l2addr_resolved(c);
} else {
MG_ERROR(("No gateway, can't connect"));
mg_error(c, "No gateway, can't connect");
}
}
}
+2 -2
View File
@@ -2335,7 +2335,7 @@ void mg_connect_resolved(struct mg_connection *c) {
memcpy(s->mac, ifp->gw6mac, sizeof(s->mac));
l2addr_resolved(c);
} else {
MG_ERROR(("No IPv6 gateway, can't connect"));
mg_error(c, "No IPv6 gateway, can't connect");
}
#endif
} else {
@@ -2351,7 +2351,7 @@ void mg_connect_resolved(struct mg_connection *c) {
memcpy(s->mac, ifp->gwmac, sizeof(s->mac));
l2addr_resolved(c);
} else {
MG_ERROR(("No gateway, can't connect"));
mg_error(c, "No gateway, can't connect");
}
}
}