mirror of
https://github.com/nodejs/node.git
synced 2024-11-28 22:46:31 +01:00
0e19476595
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/172 Fix: iojs/io.js#139
14 lines
335 B
JavaScript
14 lines
335 B
JavaScript
var common = require('../common');
|
|
var net = require('net');
|
|
var assert = require('assert');
|
|
|
|
var c = net.createConnection(common.PORT);
|
|
|
|
c.on('connect', assert.fail);
|
|
|
|
c.on('error', common.mustCall(function(e) {
|
|
assert.equal(e.code, 'ECONNREFUSED');
|
|
assert.equal(e.port, common.PORT);
|
|
assert.equal(e.address, '127.0.0.1');
|
|
}));
|