Skip to content

Commit 68efa37

Browse files
committed
Track unmanaged file descriptors
Closes: #166 PR-URL: #171
1 parent 3371ed0 commit 68efa37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ const Config = require('./lib/config.js');
88
const PATH = process.cwd();
99
const CFG_PATH = path.join(PATH, 'config');
1010

11+
const options = { trackUnmanagedFds: true };
12+
1113
(async () => {
1214
const config = await new Config(CFG_PATH);
1315
const { sections } = config;
1416
const count = sections.server.ports.length;
1517
const workers = new Array(count);
1618

1719
const start = id => {
18-
const worker = new Worker('./lib/worker.js');
20+
const worker = new Worker('./lib/worker.js', options);
1921
workers[id] = worker;
2022
worker.on('exit', code => {
2123
if (code !== 0) start(id);

0 commit comments

Comments
 (0)