Add context

This commit is contained in:
Zoltán Papp
2025-06-02 18:43:08 +02:00
parent 8be95a2efb
commit 3ecab1f31e
2 changed files with 11 additions and 5 deletions

View File

@@ -224,7 +224,7 @@ func (c *clientNetwork) getBestRouteFromStatuses(routePeerStatuses map[route.ID]
}
func (c *clientNetwork) watchPeerStatusChanges(ctx context.Context, peerKey string, peerStateUpdate chan struct{}, closer chan struct{}) {
subscription := c.statusRecorder.SubscribeToPeerStateChanges(peerKey)
subscription := c.statusRecorder.SubscribeToPeerStateChanges(ctx, peerKey)
defer c.statusRecorder.UnsubscribePeerStateChanges(subscription)
for {