mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Make message clearer and downgrade (#812)
* Make message clearer and downgrade * Differentiate between incoming and outgoing conn
This commit is contained in:
		
							parent
							
								
									620b901473
								
							
						
					
					
						commit
						9f5cc0eecb
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -185,7 +185,14 @@ func (intf *link) handler() (chan struct{}, error) {
 | 
			
		|||
		return nil, errors.New("failed to decode metadata")
 | 
			
		||||
	}
 | 
			
		||||
	if !meta.check() {
 | 
			
		||||
		intf.links.core.log.Errorf("Failed to connect to node: %s is incompatible version (local %s, remote %s)",
 | 
			
		||||
		var connectError string
 | 
			
		||||
		if intf.incoming {
 | 
			
		||||
			connectError = "Rejected incoming connection"
 | 
			
		||||
		} else {
 | 
			
		||||
			connectError = "Failed to connect"
 | 
			
		||||
		}
 | 
			
		||||
		intf.links.core.log.Debugf("%s: %s is incompatible version (local %s, remote %s)",
 | 
			
		||||
			connectError,
 | 
			
		||||
			intf.lname,
 | 
			
		||||
			fmt.Sprintf("%d.%d", base.ver, base.minorVer),
 | 
			
		||||
			fmt.Sprintf("%d.%d", meta.ver, meta.minorVer),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue