Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix test-http-upload-timeout

Cannot just close the connection or client will error.
  • Loading branch information...
commit a86747603c3ca0713a8170157afe47a41d83bbd7 1 parent 7a16e2a
@ry ry authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 test/pummel/test-http-upload-timeout.js
View
6 test/pummel/test-http-upload-timeout.js
@@ -14,18 +14,20 @@ server.on('request', function(req, res) {
});
req.on('end', function() {
connections--;
- req.socket.end();
+ res.writeHead(200);
+ res.end("done\n");
if (connections == 0) {
server.close();
}
});
});
+
server.listen(common.PORT, '127.0.0.1', function() {
for (var i = 0; i < 10; i++) {
connections++;
setTimeout(function() {
- var client = http.createClient(common.PORT, '127.0.0.1'),
+ var client = http.createClient(common.PORT),
request = client.request('POST', '/');
function ping() {
Please sign in to comment.
Something went wrong with that request. Please try again.