Skip to content

Commit

Permalink
squash: nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Oct 5, 2016
1 parent 1ffb714 commit d467bbc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/parallel/test-net-server-max-connections.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,20 @@ const net = require('net');
// and the last 10 connections are rejected.

const N = 20;
var count = 0;
var closes = 0;
const waits = [];

const server = net.createServer(function(connection) {
console.error('connect %d', count++);
const server = net.createServer(common.mustCall(function(connection) {
connection.write('hello');
waits.push(function() { connection.end(); });
});
}, N / 2));

server.listen(0, function() {
makeConnection(0);
});

server.maxConnections = N / 2;

console.error('server.maxConnections = %d', server.maxConnections);


function makeConnection(index) {
const c = net.createConnection(server.address().port);
Expand Down

0 comments on commit d467bbc

Please sign in to comment.