mirror of
https://github.com/fosrl/olm.git
synced 2026-03-07 19:26:44 +00:00
@@ -67,8 +67,8 @@ func NewPeerMonitor(wsClient *websocket.Client, middleDev *middleDevice.MiddleDe
|
|||||||
pm := &PeerMonitor{
|
pm := &PeerMonitor{
|
||||||
monitors: make(map[int]*Client),
|
monitors: make(map[int]*Client),
|
||||||
interval: 1 * time.Second, // Default check interval
|
interval: 1 * time.Second, // Default check interval
|
||||||
timeout: 2500 * time.Millisecond,
|
timeout: 5 * time.Second,
|
||||||
maxAttempts: 15,
|
maxAttempts: 5,
|
||||||
wsClient: wsClient,
|
wsClient: wsClient,
|
||||||
middleDev: middleDev,
|
middleDev: middleDev,
|
||||||
localIP: localIP,
|
localIP: localIP,
|
||||||
@@ -77,11 +77,11 @@ func NewPeerMonitor(wsClient *websocket.Client, middleDev *middleDevice.MiddleDe
|
|||||||
nsCancel: cancel,
|
nsCancel: cancel,
|
||||||
sharedBind: sharedBind,
|
sharedBind: sharedBind,
|
||||||
holepunchInterval: 5 * time.Second, // Check holepunch every 5 seconds
|
holepunchInterval: 5 * time.Second, // Check holepunch every 5 seconds
|
||||||
holepunchTimeout: 3 * time.Second,
|
holepunchTimeout: 5 * time.Second,
|
||||||
holepunchEndpoints: make(map[int]string),
|
holepunchEndpoints: make(map[int]string),
|
||||||
holepunchStatus: make(map[int]bool),
|
holepunchStatus: make(map[int]bool),
|
||||||
relayedPeers: 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),
|
holepunchFailures: make(map[int]int),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user