Fix version 1.7.4

## no issue
This commit is contained in:
2026-03-30 15:49:07 +08:00
parent 0f584f8c72
commit a71997b4ef

View File

@@ -45,9 +45,10 @@ async function gracefulShutdown(): Promise<void> {
console.log("[Prisma] Semua koneksi ditutup");
}
// Register shutdown handlers (hanya di environment Node.js)
// Register shutdown handlers (hanya di environment Node.js server)
// Cegah duplikasi listener dengan cek listenerCount terlebih dahulu
if (typeof process !== "undefined") {
// IMPORTANT: Bungkus dalam check untuk mencegah error di browser
if (typeof process !== "undefined" && typeof process.listenerCount === "function") {
if (process.listenerCount("SIGINT") === 0) {
process.on("SIGINT", gracefulShutdown);
}