Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 test/pummel/test-http-upload-timeout.js
6 test/pummel/test-http-upload-timeout.js
@@ -14,18 +14,20 @@ server.on('request', function(req, res) {
14 14 });
15 15 req.on('end', function() {
16 16 connections--;
17   - req.socket.end();
  17 + res.writeHead(200);
  18 + res.end("done\n");
18 19 if (connections == 0) {
19 20 server.close();
20 21 }
21 22 });
22 23 });
  24 +
23 25 server.listen(common.PORT, '127.0.0.1', function() {
24 26 for (var i = 0; i < 10; i++) {
25 27 connections++;
26 28
27 29 setTimeout(function() {
28   - var client = http.createClient(common.PORT, '127.0.0.1'),
  30 + var client = http.createClient(common.PORT),
29 31 request = client.request('POST', '/');
30 32
31 33 function ping() {

0 comments on commit a867476

Please sign in to comment.
Something went wrong with that request. Please try again.