mirror of https://github.com/lukechilds/node.git
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.
15 lines
385 B
15 lines
385 B
14 years ago
|
var common = require('../common');
|
||
|
var assert = require('assert');
|
||
|
var net = require('net');
|
||
14 years ago
|
|
||
14 years ago
|
var server1 = net.createServer(function(socket) {
|
||
14 years ago
|
});
|
||
14 years ago
|
var server2 = net.createServer(function(socket) {
|
||
14 years ago
|
});
|
||
14 years ago
|
server1.listen(common.PORT);
|
||
13 years ago
|
server2.on('error', function(error) {
|
||
14 years ago
|
assert.equal(true, error.message.indexOf('EADDRINUSE') >= 0);
|
||
|
server1.close();
|
||
|
});
|
||
14 years ago
|
server2.listen(common.PORT);
|