mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user