2010-10-07 01:18:08 +08:00
|
|
|
common = require('../common');
|
|
|
|
assert = common.assert
|
|
|
|
net = require('net');
|
|
|
|
|
|
|
|
var server1 = net.createServer(function (socket) {
|
|
|
|
});
|
|
|
|
var server2 = net.createServer(function (socket) {
|
|
|
|
});
|
2010-10-24 02:22:24 +08:00
|
|
|
server1.listen(common.PORT);
|
2010-10-07 01:18:08 +08:00
|
|
|
server2.addListener('error', function(error) {
|
|
|
|
assert.equal(true, error.message.indexOf('EADDRINUSE') >= 0);
|
|
|
|
server1.close();
|
|
|
|
});
|
2010-10-24 02:22:24 +08:00
|
|
|
server2.listen(common.PORT);
|