5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-10 05:10:26 +00:00

fix bug from go vet while I'm at it

This commit is contained in:
Arceliar 2018-12-07 20:36:30 -06:00
parent 2d5f99a008
commit bd2d706745

View File

@ -268,7 +268,7 @@ func (t *switchTable) forgetPeer(port switchPort) {
// 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.
// Also reclaims space from deleted peers by copying the map.
func (t switchTable) cleanPeers() {
func (t *switchTable) cleanPeers() {
now := time.Now()
for port, peer := range t.data.peers {
if now.Sub(peer.time) > switch_timeout+switch_throttle {