Browse Source

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
v0.9.1-release
Nathan Rajlich 13 years ago
parent
commit
48bbdde66b
  1. 1
      lib/repl.js

1
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');
});

Loading…
Cancel
Save