blob: 9a6e0e8980f311b0dc43e4c946437bd7f773d580 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
'use strict';
// Just test that destroying stdin doesn't mess up listening on a server.
// This is a regression test for GH-746.
const common = require('../common');
const net = require('net');
process.stdin.destroy();
const server = net.createServer(common.mustCall(function(socket) {
console.log('accepted');
socket.end();
server.close();
}));
server.listen(0, function() {
console.log('listening...');
net.createConnection(this.address().port);
});
|