2017-10-25 09:26:20 -04:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const common = require('../common');
|
|
|
|
const net = require('net');
|
|
|
|
const assert = require('assert');
|
|
|
|
|
|
|
|
const socket = new net.Socket();
|
|
|
|
socket.setTimeout(common.platformTimeout(50));
|
|
|
|
|
|
|
|
socket.on('timeout', common.mustCall(() => {
|
|
|
|
assert.strictEqual(socket._handle, null);
|
|
|
|
}));
|
|
|
|
|
|
|
|
socket.on('connect', common.mustNotCall());
|
|
|
|
|
2018-12-10 13:27:32 +01:00
|
|
|
// Since the timeout is unrefed, the code will exit without this
|
2017-10-25 09:26:20 -04:00
|
|
|
setTimeout(() => {}, common.platformTimeout(200));
|