info->log_filepath);
goto bail;
}
+#ifndef WIN32
if (context->uid != -1)
if (chown(info->log_filepath, context->uid,
context->gid) == -1)
lwsl_err("unable to chown log file %s\n",
info->log_filepath);
+#endif
} else
vh->log_fd = LWS_INVALID_FILE;
#endif
{
const struct lws_protocols *protocol = NULL;
struct lws_context_per_thread *pt;
- struct lws_vhost *vh, *vh1;
+ struct lws_vhost *vh = NULL, *vh1;
struct lws wsi;
int n, m;
/* no protocol close */);
n--;
}
+ lws_pt_mutex_destroy(pt);
}
/*
* give all extensions a chance to clean up any per-context
*
* We can't free things until after the event loop shuts down.
*/
- vh = context->vhost_list;
+ if (context->protocol_init_done)
+ vh = context->vhost_list;
while (vh) {
wsi.vhost = vh;
protocol = vh->protocols;