fix: prevent EADDRINUSE double-bind on Holesail client startup

Add global activeClientKeys Set to track all active clients and prevent
race conditions between domain init and cache restore paths. Add EADDRINUSE
error handling in holesail.js, holesail_child.js
This commit is contained in:
Raven Scott
2026-02-20 19:53:16 -05:00
parent 8d0efde1cc
commit 8bed09a537
6 changed files with 125 additions and 8 deletions
+3 -1
View File
@@ -97,5 +97,7 @@ module.exports = {
// Pending invite requests queue for when master isn't ready
pendingInviteRequests: new Map(), // Map<peerId, {timestamp, retryCount}>
// Shutdown flag to prevent operations during cleanup
isShuttingDown: false
isShuttingDown: false,
// Global set to track all active client keys (both forked and direct) to prevent double-bind
activeClientKeys: new Set()
};