mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	start new tunnel message if remining is too small
This commit is contained in:
		
							parent
							
								
									6a0174293e
								
							
						
					
					
						commit
						5993cc857a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -66,7 +66,7 @@ namespace tunnel
 | 
			
		|||
			// length of bytes doesn't fit full tunnel message
 | 
			
		||||
			// every follow-on fragment adds 7 bytes
 | 
			
		||||
			size_t nonFit = (fullMsgLen + numFollowOnFragments*7) % TUNNEL_DATA_MAX_PAYLOAD_SIZE;
 | 
			
		||||
			if (!nonFit || nonFit > m_RemainingSize)
 | 
			
		||||
			if (!nonFit || nonFit > m_RemainingSize || m_RemainingSize < fullMsgLen/5)
 | 
			
		||||
			{
 | 
			
		||||
				CompleteCurrentTunnelDataMessage ();
 | 
			
		||||
				CreateCurrentTunnelDataMessage ();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue