From 85ba6c6c739c3fe1c6b199f74cb7e0a3efaa28bf Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Mon, 5 Apr 2021 13:57:07 -0400 Subject: [PATCH] Fix tests: call end on response, not result of writeHead --- tests/support/sockjs_server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/support/sockjs_server.js b/tests/support/sockjs_server.js index 5a6f688c..055d8fbe 100644 --- a/tests/support/sockjs_server.js +++ b/tests/support/sockjs_server.js @@ -54,7 +54,8 @@ function startServer(port, config, prefix) { } else { serve(req, res, function(err) { var status = err ? err.statusCode : 404; - return res.writeHead(status).end(); + res.writeHead(status); + res.end(); }); } });