From 48bbdde66ba82c4c1274fc54385fa598352cdc15 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Tue, 27 Mar 2012 21:40:03 -0700 Subject: [PATCH] repl: don't write a newline on the readline 'end' event In the case of the input stream *actually* having been closed, then we can't write to a closed socket. Fixes test/simple/test-repl.js --- lib/repl.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/repl.js b/lib/repl.js index 505648bef5..49085bf4ce 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -176,7 +176,6 @@ function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) { rli.setPrompt(self.prompt); rli.on('end', function() { - self.rli.output.write('\n'); self.emit('exit'); });