Remove unnecesary close statement.
@@ -4388,6 +4388,8 @@ void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe
node_loader_impl_exception(env, status);
+ /* Clear event loop */
+ {
/* Stop event loop */
uv_stop(node_impl->thread_loop);
@@ -4405,6 +4407,9 @@ void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe
fflush(stdout);
}
+ /* Note: This evaluates to true always due to stdin and stdout handles,
+ which are closed anyway on thread join. So it is removed by now. */
+ #if 0
/* TODO: Check how to delete properly all handles */
if (uv_loop_close(node_impl->thread_loop) == UV_EBUSY)
{
@@ -4413,6 +4418,8 @@ void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe
printf("NodeJS Loader Error: NodeJS event loop should not be busy\n");
fflush(stdout);
}
+ #endif
+ }
/* Close scope */
status = napi_close_handle_scope(env, handle_scope);
