clawmatrix 0.4.1 → 0.4.2
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/package.json +1 -1
- package/src/peer-manager.ts +6 -0
package/package.json
CHANGED
package/src/peer-manager.ts
CHANGED
|
@@ -801,6 +801,12 @@ export class PeerManager extends EventEmitter<PeerManagerEvents> {
|
|
|
801
801
|
const channelCount = this.router.getChannelCount(nodeId);
|
|
802
802
|
debug("peer", `completePeerJoin(${nodeId}): additional channel added (total=${channelCount})`);
|
|
803
803
|
audit("channel_add", { nodeId, detail: `channels=${channelCount}` });
|
|
804
|
+
// If the peer reconnected after a grace period, its client-side state
|
|
805
|
+
// may have been reset (e.g. iOS app restart). Send peer_sync so the
|
|
806
|
+
// reconnecting node re-discovers other peers in the cluster.
|
|
807
|
+
if (wasInGrace) {
|
|
808
|
+
this.sendPeerSync(conn);
|
|
809
|
+
}
|
|
804
810
|
return;
|
|
805
811
|
}
|
|
806
812
|
|