Avoid assertion failure closing tty stdin on windows
authorBert Belder <bertbelder@gmail.com>
Tue, 5 Jul 2011 00:32:51 +0000 (02:32 +0200)
committerBert Belder <bertbelder@gmail.com>
Tue, 5 Jul 2011 00:33:13 +0000 (02:33 +0200)
src/node_stdio_win32.cc

index 575f4ad..f76c71b 100644 (file)
@@ -579,7 +579,9 @@ static void tty_poll(uv_async_t* handle, int status) {
   }
 
   // Rearm the watcher
-  tty_watcher_arm();
+  if (tty_watcher_active) {
+    tty_watcher_arm();
+  }
 
   // Emit fatal errors and unhandled error events
   if (try_catch.HasCaught()) {