summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2011-07-05 02:32:51 +0200
committerBert Belder <bertbelder@gmail.com>2011-07-05 02:33:13 +0200
commit4062a42aae4c8d2a11b867706c6b704258440115 (patch)
tree2cfdace9cbcbc3782d4d823ae3b07a1d00688d06
parent0c3a7c075e91ed2fb4a992cb62aadc1167d8a7db (diff)
downloadnodejs-4062a42aae4c8d2a11b867706c6b704258440115.tar.gz
nodejs-4062a42aae4c8d2a11b867706c6b704258440115.tar.bz2
nodejs-4062a42aae4c8d2a11b867706c6b704258440115.zip
Avoid assertion failure closing tty stdin on windows
-rw-r--r--src/node_stdio_win32.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node_stdio_win32.cc b/src/node_stdio_win32.cc
index 575f4ad43..f76c71bf6 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()) {