mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-03 10:45:09 +03:00 
			
		
		
		
	fix bug from go vet while I'm at it
This commit is contained in:
		
							parent
							
								
									2d5f99a008
								
							
						
					
					
						commit
						bd2d706745
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue