mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	temporary fix to nil pointer, better to make sure it's never nil
This commit is contained in:
		
							parent
							
								
									bd3b42022b
								
							
						
					
					
						commit
						84a4f54217
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -161,7 +161,9 @@ func (r *router) handleTraffic(packet []byte) {
 | 
			
		|||
		return
 | 
			
		||||
	}
 | 
			
		||||
	sinfo, isIn := r.core.sessions.getSessionForHandle(&p.Handle)
 | 
			
		||||
	if !isIn {
 | 
			
		||||
	if !isIn || sinfo.cancel == nil {
 | 
			
		||||
		// FIXME make sure sinfo.cancel can never be nil
 | 
			
		||||
		util.PutBytes(p.Payload)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	select {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue