Commit 5ea90ba6 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Fix crash with signal QUIT if mruby is not initialized

parent fd8067be
......@@ -42,7 +42,11 @@ MRubyContext::MRubyContext(mrb_state *mrb, RProc *on_request_proc,
: mrb_(mrb), on_request_proc_(on_request_proc),
on_response_proc_(on_response_proc), running_(false) {}
MRubyContext::~MRubyContext() { mrb_close(mrb_); }
MRubyContext::~MRubyContext() {
if (mrb_) {
mrb_close(mrb_);
}
}
int MRubyContext::run_request_proc(Downstream *downstream, RProc *proc,
int phase) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment