network/pkg/client/monitoring.go
anonpenguin 6301ed9182 refactor: split network client code into focused modules and extract config mapping
The changes reorganize the network client code by splitting it into focused modules for better maintainability, including
2025-08-09 12:00:35 +03:00

21 lines
399 B
Go

package client
import "time"
// startConnectionMonitoring monitors connection health and logs status
func (c *Client) startConnectionMonitoring() {
go func() {
ticker := time.NewTicker(30 * time.Second)
defer ticker.Stop()
for range ticker.C {
if !c.isConnected() {
return
}
// Only touch network to detect issues; avoid noisy logs
_ = c.host.Network().Peers()
}
}()
}