Skip to content

Commit

Permalink
Listen for close event rather than exit
Browse files Browse the repository at this point in the history
Listening to the exit event leads to occasional data loss.

See nateps/connect-gzip#18
  • Loading branch information
jscheid committed Nov 18, 2015
1 parent 89c83f7 commit 64df777
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ exports.compile = function(input, options, callback) {
compiler.stderr.on('data', function(data) {
return stderr += data;
});
compiler.on('exit', function(code) {
compiler.on('close', function(code) {
var error;
if (code !== 0) {
error = new Error(stderr);
Expand Down

0 comments on commit 64df777

Please sign in to comment.