mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	fixed potential race condition
This commit is contained in:
		
							parent
							
								
									c0d1e2c07a
								
							
						
					
					
						commit
						062d8d0f4f
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -755,7 +755,8 @@ namespace client
 | 
			
		|||
				},
 | 
			
		||||
				SUBSCRIPTION_REQUEST_TIMEOUT);
 | 
			
		||||
			std::unique_lock<std::mutex> l(newDataReceivedMutex);
 | 
			
		||||
			if (newDataReceived.wait_for (l, std::chrono::seconds (SUBSCRIPTION_REQUEST_TIMEOUT)) == std::cv_status::timeout)
 | 
			
		||||
			// wait 1 more second
 | 
			
		||||
			if (newDataReceived.wait_for (l, std::chrono::seconds (SUBSCRIPTION_REQUEST_TIMEOUT + 1)) == std::cv_status::timeout)
 | 
			
		||||
			{
 | 
			
		||||
				LogPrint (eLogError, "Addressbook: subscriptions request timeout expired");
 | 
			
		||||
				numAttempts++;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue