diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index 8408e021450..58c2d78b2aa 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -117,6 +117,9 @@ inline v8::Handle AsyncWrap::MakeCallback( if (has_async_queue()) { v8::Local val = context.As(); env()->async_listener_unload_function()->Call(process, 1, &val); + + if (try_catch.HasCaught()) + return v8::Undefined(env()->isolate()); } Environment::TickInfo* tick_info = env()->tick_info();