WIP: improve responsiveness.
This commit is contained in:
15
peer/on_pingticker.go
Normal file
15
peer/on_pingticker.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package peer
|
||||
|
||||
import (
|
||||
"time"
|
||||
"vppn/peer/control"
|
||||
)
|
||||
|
||||
func (a *App) onPingTicker() {
|
||||
now := time.Now().UnixNano()
|
||||
for _, p := range a.peersByIP {
|
||||
if p.Role == control.Client {
|
||||
a.sendPing(p, now)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user