feat: add HyperDB replication to file.drop plugin

- Add database watcher to monitor @filedrop/files collection changes
- Implement robust database initialization with retry logic (30 attempts)
- Add replication status checking and logging on startup
- Add peer connection handlers for active replication updates
- Enable real-time database synchronization across P2NS network
This commit is contained in:
Raven Scott
2025-12-26 20:21:15 -05:00
parent 9edefdb61d
commit 94c923cc6d
3 changed files with 151 additions and 9 deletions
+1 -1
View File
@@ -470,7 +470,7 @@ function createPluginChannelsForPeer(peerId, conn, mux) {
return;
}
setRecreating(pluginDomain, protocol, peerId);
peerChannel.lastReopenAttempt = now;
peerChannel.lastReopenAttempt = Date.now();
logDebug('ChannelManager', `Channel ${fullProtocol} fully closed, recreating for peer ${peerId.substring(0, 16)}...`);
// Remove old channel reference
channelInfo.peerChannels.delete(peerId);