From c94820849362d9e69d0e71e2c9399833379e2e94 Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 2 Dec 2025 11:17:19 -0500 Subject: [PATCH] Update monitor Former-commit-id: 0b87070e3109d50a57354775e0b6434d2259a300 --- peers/monitor/monitor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/peers/monitor/monitor.go b/peers/monitor/monitor.go index 59bbbef..95a34ac 100644 --- a/peers/monitor/monitor.go +++ b/peers/monitor/monitor.go @@ -67,8 +67,8 @@ func NewPeerMonitor(wsClient *websocket.Client, middleDev *middleDevice.MiddleDe pm := &PeerMonitor{ monitors: make(map[int]*Client), interval: 1 * time.Second, // Default check interval - timeout: 2500 * time.Millisecond, - maxAttempts: 15, + timeout: 5 * time.Second, + maxAttempts: 5, wsClient: wsClient, middleDev: middleDev, localIP: localIP, @@ -77,11 +77,11 @@ func NewPeerMonitor(wsClient *websocket.Client, middleDev *middleDevice.MiddleDe nsCancel: cancel, sharedBind: sharedBind, holepunchInterval: 5 * time.Second, // Check holepunch every 5 seconds - holepunchTimeout: 3 * time.Second, + holepunchTimeout: 5 * time.Second, holepunchEndpoints: make(map[int]string), holepunchStatus: make(map[int]bool), relayedPeers: make(map[int]bool), - holepunchMaxAttempts: 3, // Trigger relay after 3 consecutive failures + holepunchMaxAttempts: 5, // Trigger relay after 5 consecutive failures holepunchFailures: make(map[int]int), }