You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
413 B

var common = require('../common');
var assert = require('assert');
var Stream = require('net').Stream;
var s = new Stream();
// test that destroy called on a stream with a server only ever decrements the
// server connection count once
s.server = { connections: 10 }
assert.equal(10, s.server.connections);
s.destroy()
assert.equal(9, s.server.connections);
s.destroy()
assert.equal(9, s.server.connections);