Skip to content

Commit 20939e7

Browse files
committed
Fixed incorrect access to context in asynchronous applications
1 parent 55dcb27 commit 20939e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/http_context.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ void context::dispatch(booster::intrusive_ptr<application> app,std::string url,b
134134
if(syncronous)
135135
app->context().session().load();
136136
app->main(url);
137-
app->context().complete_response();
137+
if(app->get_context())
138+
app->context().complete_response();
138139
}
139140
catch(std::exception const &e){
140141
if(app->get_context() && !app->response().some_output_was_written()) {

0 commit comments

Comments
 (0)