mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src: fix abort on uv_loop_init() failure
Fixes: https://github.com/nodejs/node/issues/34855 PR-URL: https://github.com/nodejs/node/pull/34874 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
d953fa3038
commit
26a596bf29
1 file changed
+9
-1
+9
-1
@@ -457,9 +457,17 @@ Maybe<bool> SyncProcessRunner::TryInitializeAndRunLoop(Local<Value> options) {
|
||||
SetError(UV_ENOMEM);
|
||||
return Just(false);
|
||||
}
|
||||
CHECK_EQ(uv_loop_init(uv_loop_), 0);
|
||||
|
||||
r = uv_loop_init(uv_loop_);
|
||||
if (r < 0) {
|
||||
delete uv_loop_;
|
||||
uv_loop_ = nullptr;
|
||||
SetError(r);
|
||||
return Just(false);
|
||||
}
|
||||
|
||||
if (!ParseOptions(options).To(&r)) return Nothing<bool>();
|
||||
|
||||
if (r < 0) {
|
||||
SetError(r);
|
||||
return Just(false);
|
||||
|
||||
Reference in new issue
Block a user