mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Don't try to correct peers with no schemes in addPeer
This commit is contained in:
		
							parent
							
								
									ccf6ce07a4
								
							
						
					
					
						commit
						3ca5f10733
					
				
					 1 changed files with 1 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -515,13 +515,7 @@ func (a *admin) addPeer(addr string, sintf string) error {
 | 
			
		|||
			return errors.New("invalid peer: " + addr)
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		// no url scheme provided
 | 
			
		||||
		addr = strings.ToLower(addr)
 | 
			
		||||
		if strings.HasPrefix(addr, "tcp:") {
 | 
			
		||||
			addr = addr[4:]
 | 
			
		||||
		}
 | 
			
		||||
		a.core.tcp.connect(addr, "")
 | 
			
		||||
		return nil
 | 
			
		||||
		return errors.New("invalid peer: " + addr)
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue