Skip to content

Commit 0b8cf9f

Browse files
committed
server.js: Allow infinite listeners.
See #47.
1 parent 139be39 commit 0b8cf9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/server.js

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
const path = require('node:path')
99
const nodejs_net = require('node:net');
1010
const fs = require('node:fs');
11+
const emitter = require('node:events');
1112
// The architecture of protocol handling resorts to a tmp file, meaning that the
1213
// main JS location may differ from the location of the current file.
1314
const SynchronousSocket = require(path.resolve('node_modules/synchronous-socket'));
@@ -18,6 +19,8 @@ dialog.showErrorBox = function(title, content) {
1819
console.log(`${title}\n${content}`);
1920
};
2021

22+
emitter.setMaxListeners(0)
23+
2124
app.on('ready', () => {
2225
const server = nodejs_net.createServer((socket) => {
2326
socket.on('data', (data) => {

0 commit comments

Comments
 (0)