Skip to content

Commit

Permalink
Merge pull request #265 from sockjs/fix-write-after-end
Browse files Browse the repository at this point in the history
Call res.write instead of res.end in writeHead
  • Loading branch information
brycekahle authored Mar 6, 2020
2 parents 7441c82 + c8c68e0 commit 86ba45a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports.fake_response = function fake_response(req, res) {
r.push('');
r.push('');
try {
res.end(r.join('\r\n'));
res.write(r.join('\r\n'));
} catch (x) {
// intentionally empty
}
Expand Down

0 comments on commit 86ba45a

Please sign in to comment.