Remove watcher

This commit is contained in:
Zoltán Papp
2025-02-26 11:24:57 +01:00
parent 309e825d58
commit e2e1458878
2 changed files with 3 additions and 31 deletions

View File

@@ -20,6 +20,8 @@ type rxHistory struct {
received int64
}
// Watcher checks for peer timeouts
// Todo: this is a naive implementation, we must to finish it
type Watcher struct {
PeerTimedOutChan chan string
@@ -70,7 +72,6 @@ func (m *Watcher) RemovePeer(id string) {
delete(m.peers, id)
}
// Todo: this is a naive implementation, we must to finish it
func (m *Watcher) checkTimeouts(ctx context.Context, allPeersStats map[string]configurer.WGStats) {
m.peersMu.Lock()
defer m.peersMu.Unlock()