mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-13 00:30:28 +00:00
fix bug from go vet while I'm at it
This commit is contained in:
parent
2d5f99a008
commit
bd2d706745
@ -268,7 +268,7 @@ func (t *switchTable) forgetPeer(port switchPort) {
|
|||||||
// Clean all unresponsive peers from the table, needed in case a peer stops updating.
|
// Clean all unresponsive peers from the table, needed in case a peer stops updating.
|
||||||
// Needed in case a non-parent peer keeps the connection open but stops sending updates.
|
// Needed in case a non-parent peer keeps the connection open but stops sending updates.
|
||||||
// Also reclaims space from deleted peers by copying the map.
|
// Also reclaims space from deleted peers by copying the map.
|
||||||
func (t switchTable) cleanPeers() {
|
func (t *switchTable) cleanPeers() {
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
for port, peer := range t.data.peers {
|
for port, peer := range t.data.peers {
|
||||||
if now.Sub(peer.time) > switch_timeout+switch_throttle {
|
if now.Sub(peer.time) > switch_timeout+switch_throttle {
|
||||||
|
Loading…
Reference in New Issue
Block a user