blob: 4741c82079715456b1b1731816bb694d37a2881d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
'use strict';
require('../common');
var assert = require('assert');
var net = require('net');
var server1 = net.createServer(function(socket) {
});
var server2 = net.createServer(function(socket) {
});
server1.listen(0, function() {
server2.on('error', function(error) {
assert.equal(true, error.message.indexOf('EADDRINUSE') >= 0);
server1.close();
});
server2.listen(this.address().port);
});
|