Skip to content

Commit

Permalink
Fix issue c9#496: Cannot set headers after they are sent to the clien…
Browse files Browse the repository at this point in the history
…t on Node.js>10.1.0
  • Loading branch information
DanielDiBe committed Jul 27, 2018
1 parent d8917f3 commit 4b2e09d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/c9.vfs.server/vfs.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ function plugin(options, imports, register) {
req.on("close", function() {
done = true;
cancel();
res.json({}, 0, 500);
if(!res.headersSent)
res.json({}, 0, 500);
});
}
]);
Expand Down

0 comments on commit 4b2e09d

Please sign in to comment.