Skip to content

Commit a31867c

Browse files
committed
Better ordering
1 parent de906c4 commit a31867c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/node_io_watcher.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,11 @@ void IOWatcher::Dump(EV_P_ ev_prepare *watcher, int revents) {
479479
// Otherwise we need to prepare the io_watcher to wait for the interface
480480
// to become writable again.
481481

482-
if (watcher_obj->Get(buckets_sym)->IsUndefined()) {
483-
// Emptied the queue for this socket.
482+
if (watcher_obj->Get(buckets_sym)->IsUndefined() == false) {
483+
io->Start();
484+
DEBUG_PRINT("Started watcher %d", io->watcher_.fd);
485+
} else {
486+
// Emptied the buckets queue for this socket.
484487
// Don't wait for it to become writable.
485488
io->Stop();
486489

@@ -504,10 +507,6 @@ void IOWatcher::Dump(EV_P_ ev_prepare *watcher, int revents) {
504507
FatalException(try_catch);
505508
}
506509
}
507-
508-
} else {
509-
io->Start();
510-
DEBUG_PRINT("Started watcher %d", io->watcher_.fd);
511510
}
512511
}
513512
}

0 commit comments

Comments
 (0)