sliftutils 1.7.14 → 1.7.16

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.
@@ -119,21 +119,22 @@ export async function hostStorageServer(config: HostStorageServerConfig): Promis
119
119
  }, DISK_SPACE_CHECK_INTERVAL_MS);
120
120
  (interval as { unref?: () => void }).unref?.();
121
121
 
122
- // Zero-downtime deploys: only enabled when a deploy timeline exists - otherwise a busy port is
123
- // a real misconfiguration and must throw, not silently listen elsewhere
124
- let hasDeployTimeline = await initDeployTakeover({ domain, mainPort: port, storageFolder: path.resolve(folder) });
122
+ // Port fallback is always on: a busy port means listening on an alternate, registering it, and
123
+ // polling to take the real port. The deploy takeover machinery merely rides on top (tighter
124
+ // polling around a scheduled switchover, and the valid-window remap once a successor is known).
125
+ await initDeployTakeover({ domain, mainPort: port, storageFolder: path.resolve(folder) });
125
126
 
126
127
  await hostServer({
127
128
  domain,
128
129
  port,
129
130
  setDNSRecord: true,
130
- portFallback: hasDeployTimeline && {
131
+ portFallback: {
131
132
  getAcquireDelay: getMainPortAcquireDelay,
132
133
  onListening: (listeningPort, isMainPort) => {
133
134
  if (isMainPort) return;
134
135
  addExtraListenPort(listeningPort);
135
136
  void registerAltPort(listeningPort).catch((e: Error) => console.error(`Registering alternate port ${listeningPort} failed: ${e.stack ?? e}`));
136
137
  },
137
- } || undefined,
138
+ },
138
139
  });
139
140
  }