From 167b60cf022b15f12b97e39ea068da6273c3ffff Mon Sep 17 00:00:00 2001 From: Janos Kasza Date: Wed, 14 Mar 2018 22:45:53 +0100 Subject: [PATCH] Change default socket.io timeout --- app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index da33a48..9feb03a 100644 --- a/app.js +++ b/app.js @@ -90,8 +90,12 @@ if (runhttps) { }); } -var io = server(httpserv,{path: '/wetty/socket.io'}); -io.on('connection', function(socket){ +var io = server(httpserv, { + path: '/wetty/socket.io', + pingTimeout: 7000, + pingInterval: 3000 +}); +io.on('connection', function(socket) { var sshuser = ''; var request = socket.request; console.log((new Date()) + ' Connection accepted.');