fix: no shutdown outside of puter servers (#2762)

This commit is contained in:
Daniel Salazar
2026-04-02 11:36:49 -07:00
committed by GitHub
parent 99d96edd9c
commit 0505a5df1f
@@ -341,6 +341,11 @@ class WebServerService extends BaseService {
}
registerGracefulShutdownHandlers () {
if ( ! process.env.PUTER_SERVER_ID ) {
// if not set not running in production, so we can skip setting up graceful shutdown handlers
console.warn('PUTER_SERVER_ID is not set; graceful shutdown handlers will not be registered');
return;
}
if ( this.gracefulShutdownHandlersInstalled ) return;
this.gracefulShutdownHandlersInstalled = true;