@scalemule/nextjs 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/index.js +6 -4
- package/dist/server/index.mjs +6 -4
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -1810,10 +1810,12 @@ var _shutdownRegistered = false;
|
|
|
1810
1810
|
function ensureShutdownHook() {
|
|
1811
1811
|
if (_shutdownRegistered) return;
|
|
1812
1812
|
_shutdownRegistered = true;
|
|
1813
|
-
process.once
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1813
|
+
if (typeof process !== "undefined" && typeof process.once === "function") {
|
|
1814
|
+
process.once("SIGTERM", async () => {
|
|
1815
|
+
const shutdowns = Array.from(_clients.values()).map((c) => c.shutdown());
|
|
1816
|
+
await Promise.allSettled(shutdowns);
|
|
1817
|
+
});
|
|
1818
|
+
}
|
|
1817
1819
|
}
|
|
1818
1820
|
function extractClientIp(hdrs) {
|
|
1819
1821
|
const realIp = hdrs.get("x-real-ip") || hdrs.get("x-real-client-ip");
|
package/dist/server/index.mjs
CHANGED
|
@@ -1808,10 +1808,12 @@ var _shutdownRegistered = false;
|
|
|
1808
1808
|
function ensureShutdownHook() {
|
|
1809
1809
|
if (_shutdownRegistered) return;
|
|
1810
1810
|
_shutdownRegistered = true;
|
|
1811
|
-
process.once
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1811
|
+
if (typeof process !== "undefined" && typeof process.once === "function") {
|
|
1812
|
+
process.once("SIGTERM", async () => {
|
|
1813
|
+
const shutdowns = Array.from(_clients.values()).map((c) => c.shutdown());
|
|
1814
|
+
await Promise.allSettled(shutdowns);
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1815
1817
|
}
|
|
1816
1818
|
function extractClientIp(hdrs) {
|
|
1817
1819
|
const realIp = hdrs.get("x-real-ip") || hdrs.get("x-real-client-ip");
|
package/package.json
CHANGED