mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	don't throw exception if local bind fails
This commit is contained in:
		
							parent
							
								
									d6f5640685
								
							
						
					
					
						commit
						a8e1cd9a13
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -84,7 +84,11 @@ namespace client
 | 
			
		|||
		// bind to 127.x.x.x address
 | 
			
		||||
		// where x.x.x are first three bytes from ident
 | 
			
		||||
		auto ourIP = GetLoopbackAddressFor(addr);
 | 
			
		||||
		sock->bind (boost::asio::ip::tcp::endpoint (ourIP, 0));
 | 
			
		||||
		boost::system::error_code ec;
 | 
			
		||||
		sock->bind (boost::asio::ip::tcp::endpoint (ourIP, 0), ec);
 | 
			
		||||
		if (ec)
 | 
			
		||||
			LogPrint (eLogError, "I2PTunnel: can't bind ourIP to ", ourIP.to_string (), ": ", ec.message ());	
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue