mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	fix very special case bug when trying to dhtPing the root via the admin api
This commit is contained in:
		
							parent
							
								
									bd2d706745
								
							
						
					
					
						commit
						af478e0e45
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -739,6 +739,10 @@ func (a *admin) admin_dhtPing(keyString, coordString, targetString string) (dhtR
 | 
			
		|||
	}
 | 
			
		||||
	var coords []byte
 | 
			
		||||
	for _, cstr := range strings.Split(strings.Trim(coordString, "[]"), " ") {
 | 
			
		||||
		if cstr == "" {
 | 
			
		||||
			// Special case, happens if trimmed is the empty string, e.g. this is the root
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
		if u64, err := strconv.ParseUint(cstr, 10, 8); err != nil {
 | 
			
		||||
			return dhtRes{}, err
 | 
			
		||||
		} else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue