mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +00:00
Setting user_data for fake connection
This commit is contained in:
1 parent
3156ac9791
commit
9fd435059f
1 file changed
+2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user