Skip to content

Commit

Permalink
ignore request timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed Sep 18, 2024
1 parent 755d452 commit 9b19337
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ function createServer(ezs, serverPort, serverPath, workerId) {
next();
});
const server = controlServer(http.createServer(app));
server.setTimeout(0);
server.setTimeout(0); // default value, useful?
server.requestTimeout = 0; // ezs has its own timeout see feed.timeout
server.listen(serverPort);
server.addListener('connection', (socket) => {
httpConnectionTotal.inc();
httpConnectionOpen.inc();
socket.on('error', (e) => {
debug('ezs')('Connection error, the server has stopped the request :', e.message);
});
socket.on('close', () => {
httpConnectionOpen.dec();
});
Expand Down

0 comments on commit 9b19337

Please sign in to comment.