diff --git a/lib/repl.js b/lib/repl.js index 86471af60ad..8c4e6f0c370 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -423,7 +423,7 @@ function defineDefaultCommands(repl) { repl.defineCommand('exit', { help: 'Exit the repl', action: function() { - this.stream.destroy(); + this.rli.close(); } });