mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-26 15:15:58 +00:00
fix: no shutdown outside of puter servers (#2762)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user