diff --git a/docs/index.html b/docs/index.html index a1b60f97..2ddf9009 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1944,14 +1944,14 @@ document.getElementById('edNewCh').onclick=function(){ var editorStartTime=null; var editorTimerInterval=null; function startEditorTimer(){ - if(editorTimerInterval)return; + stopEditorTimer(); editorStartTime=Date.now(); editorTimerInterval=setInterval(function(){ var el=document.getElementById('edTimer'); if(!el)return; var elapsed=Math.floor((Date.now()-editorStartTime)/60000); el.textContent='⏱ '+elapsed+'min'; - },10000); + },60000); } function stopEditorTimer(){ if(editorTimerInterval){clearInterval(editorTimerInterval);editorTimerInterval=null} diff --git a/server/proxy/service/subscription-server.js b/server/proxy/service/subscription-server.js index 5fdbb19a..76de93fd 100644 --- a/server/proxy/service/subscription-server.js +++ b/server/proxy/service/subscription-server.js @@ -570,11 +570,12 @@ server.listen(PORT, '127.0.0.1', () => { // Graceful shutdown function gracefulShutdown(signal) { console.log(`\n${signal} received. Shutting down gracefully...`); + const forceExit = setTimeout(() => { process.exit(1); }, 5000); server.close(() => { + clearTimeout(forceExit); console.log('Server closed.'); process.exit(0); }); - setTimeout(() => { process.exit(1); }, 5000); } process.on('SIGTERM', () => gracefulShutdown('SIGTERM')); process.on('SIGINT', () => gracefulShutdown('SIGINT'));