Setting user_data for fake connection

This commit is contained in:
Sergey Lyubka 2013-09-25 14:28:09 +01:00
parent 3156ac9791
commit 9fd435059f

View File

@ -667,6 +667,8 @@ static void cry(struct mg_connection *conn, const char *fmt, ...) {
static struct mg_connection *fc(struct mg_context *ctx) {
static struct mg_connection fake_connection;
fake_connection.ctx = ctx;
// See https://github.com/cesanta/mongoose/issues/236
fake_connection.request_info.user_data = ctx->user_data;
return &fake_connection;
}