Do not create socket until resolved

This commit is contained in:
cpq committed 2020-12-21 12:26:44 +00:00
1 parent ddb700eee5
commit b93456f512
14 files changed
+162 -173

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ void mg_error(struct mg_connection *c, const char *fmt, ...) {
va_start(ap, fmt);
mg_vasprintf(&buf, sizeof(mem), fmt, ap);
va_end(ap);
LOG(LL_ERROR, ("%p %s", c->fd, buf));
LOG(LL_ERROR, ("%lu %s", c->id, buf));
mg_call(c, MG_EV_ERROR, buf);
if (buf != mem) free(buf);
c->is_closing = 1;