-
-
Save bnoordhuis/70252aefa4d34899f38e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/node.js b/src/node.js | |
index 15cccb6..5c83462 100644 | |
--- a/src/node.js | |
+++ b/src/node.js | |
@@ -326,6 +326,10 @@ | |
// For supporting legacy API we put the FD here. | |
stdin.fd = fd; | |
+ // Unref the handle so it doesn't keep the event loop alive. | |
+ // .resume() refs the handle and the user needs to call that anyway. | |
+ if (stdin._handle) stdin._handle.unref(); | |
+ | |
return stdin; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment