From 4062a42aae4c8d2a11b867706c6b704258440115 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Tue, 5 Jul 2011 02:32:51 +0200 Subject: [PATCH] Avoid assertion failure closing tty stdin on windows --- src/node_stdio_win32.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node_stdio_win32.cc b/src/node_stdio_win32.cc index 575f4ad..f76c71b 100644 --- a/src/node_stdio_win32.cc +++ b/src/node_stdio_win32.cc @@ -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()) { -- 2.7.4