mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Revert "Catch a nil pointer when sending a session packet to a conn, this shouldn't happen but it's caused multiple crashes in conn.recvMsg"
This reverts commit be35675d0f.
			
			
This commit is contained in:
		
							parent
							
								
									be35675d0f
								
							
						
					
					
						commit
						0a12e4b1c1
					
				
					 1 changed files with 1 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -470,14 +470,7 @@ func (sinfo *sessionInfo) _recvPacket(p *wire_trafficPacket) {
 | 
			
		|||
		callback := func() {
 | 
			
		||||
			util.PutBytes(p.Payload)
 | 
			
		||||
			if !isOK || k != sinfo.sharedSesKey || !sinfo._nonceIsOK(&p.Nonce) {
 | 
			
		||||
				// Either we failed to decrypt, or the session was updated, or we
 | 
			
		||||
				// received this packet in the mean time
 | 
			
		||||
				util.PutBytes(bs)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
			if sinfo.conn == nil {
 | 
			
		||||
				// There's no connection associated with this session for some reason
 | 
			
		||||
				// TODO: Figure out why this happens sometimes, it shouldn't
 | 
			
		||||
				// Either we failed to decrypt, or the session was updated, or we received this packet in the mean time
 | 
			
		||||
				util.PutBytes(bs)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue