fix: libuv hang on Windows (#28175)
This commit is contained in:
parent
d10398610b
commit
665ac6f9c8
7 changed files with 86 additions and 6 deletions
|
@ -534,15 +534,13 @@ void NodeBindings::LoadEnvironment(node::Environment* env) {
|
|||
void NodeBindings::PrepareMessageLoop() {
|
||||
#if !defined(OS_WIN)
|
||||
int handle = uv_backend_fd(uv_loop_);
|
||||
#else
|
||||
HANDLE handle = uv_loop_->iocp;
|
||||
#endif
|
||||
|
||||
// If the backend fd hasn't changed, don't proceed.
|
||||
if (handle == handle_)
|
||||
return;
|
||||
|
||||
handle_ = handle;
|
||||
#endif
|
||||
|
||||
// Add dummy handle for libuv, otherwise libuv would quit when there is
|
||||
// nothing to do.
|
||||
|
|
|
@ -159,9 +159,7 @@ class NodeBindings {
|
|||
// Isolate data used in creating the environment
|
||||
node::IsolateData* isolate_data_ = nullptr;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
HANDLE handle_;
|
||||
#else
|
||||
#if !defined(OS_WIN)
|
||||
int handle_ = -1;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue