Skip to content

Commit 234adef

Browse files
Merge pull request jashkenas#3952 from sixmen/fix_write_after_fin
fix write after FIN error when using repl via socket
2 parents 140a73d + ce10a46 commit 234adef

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/coffee-script/repl.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/repl.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ module.exports =
152152
opts = merge replDefaults, opts
153153
repl = nodeREPL.start opts
154154
runInContext opts.prelude, repl.context, 'prelude' if opts.prelude
155-
repl.on 'exit', -> repl.outputStream.write '\n'
155+
repl.on 'exit', -> repl.outputStream.write '\n' if not repl.rli.closed
156156
addMultilineHandler repl
157157
addHistory repl, opts.historyFile, opts.historyMaxInputSize if opts.historyFile
158158
# Adapt help inherited from the node REPL

0 commit comments

Comments
 (0)