UNPKG

andrade-soulseek-downloader

Version:

Simple, safe Soulseek download library with built-in rate limiting to prevent bans

23 lines 750 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.registerProcessHandlers = registerProcessHandlers; const functions_1 = require("./functions"); /** * Registers process cleanup handlers for graceful shutdown. */ function registerProcessHandlers() { process.on('beforeExit', async () => { await (0, functions_1.soulseekDisconnect)(); }); process.on('SIGINT', async () => { await (0, functions_1.soulseekDisconnect)(); process.exit(0); }); process.on('SIGTERM', async () => { await (0, functions_1.soulseekDisconnect)(); process.exit(0); }); } // Auto-register handlers on import registerProcessHandlers(); //# sourceMappingURL=process-handlers.js.map