mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 00:20:46 +00:00 
			
		
		
		
	fixed race condition
This commit is contained in:
		
							parent
							
								
									3acdbf38c9
								
							
						
					
					
						commit
						5ed34cc52a
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -60,7 +60,8 @@ namespace stream
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// send ack for last message
 | 
								// send ack for last message
 | 
				
			||||||
			SendQuickAck ();
 | 
								if (m_IsOpen)
 | 
				
			||||||
 | 
									SendQuickAck ();
 | 
				
			||||||
		}	
 | 
							}	
 | 
				
			||||||
		else 
 | 
							else 
 | 
				
			||||||
		{	
 | 
							{	
 | 
				
			||||||
| 
						 | 
					@ -127,9 +128,9 @@ namespace stream
 | 
				
			||||||
		if (flags & PACKET_FLAG_CLOSE)
 | 
							if (flags & PACKET_FLAG_CLOSE)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			LogPrint ("Closed");
 | 
								LogPrint ("Closed");
 | 
				
			||||||
 | 
								SendQuickAck (); // send ack for close explicitly?
 | 
				
			||||||
			m_IsOpen = false;
 | 
								m_IsOpen = false;
 | 
				
			||||||
			m_ReceiveQueue.WakeUp ();
 | 
								m_ReceiveQueue.WakeUp ();
 | 
				
			||||||
			m_ReceiveTimer.cancel ();
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}	
 | 
						}	
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue