Permalink
Browse files

Set watcher.next to null after it's removed from dumpQueue

  • Loading branch information...
1 parent 11f7ff0 commit de906c4df2fa997a059822e004784924e855914d @ry ry committed Nov 6, 2010
Showing with 3 additions and 0 deletions.
  1. +1 −0 src/node_io_watcher.cc
  2. +2 −0 test/simple/test-dumper.js
View
@@ -488,6 +488,7 @@ void IOWatcher::Dump(EV_P_ ev_prepare *watcher, int revents) {
// Drop the watcher_obj from the list.
watcher_obj_last->Set(next_sym, watcher_obj->Get(next_sym));
+ watcher_obj->Set(next_sym, Null());
// Emit drain event
if (watcher_obj->Has(ondrain_sym)) {
@@ -59,6 +59,8 @@ function test (N, b, cb) {
x = x.next;
}
+ assert.equal(null, w.next);
+
ncomplete++;
if (cb) cb();
});

0 comments on commit de906c4

Please sign in to comment.