mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 00:20:46 +00:00 
			
		
		
		
	update leaseset in destination's thread
This commit is contained in:
		
							parent
							
								
									bc9d25ec3b
								
							
						
					
					
						commit
						890fe77b10
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -141,7 +141,7 @@ namespace tunnel
 | 
				
			||||||
			m_InboundTunnels.insert (createdTunnel);
 | 
								m_InboundTunnels.insert (createdTunnel);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (m_LocalDestination)
 | 
							if (m_LocalDestination)
 | 
				
			||||||
			m_LocalDestination->SetLeaseSetUpdated ();
 | 
								m_LocalDestination->SetLeaseSetUpdated (true);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void TunnelPool::TunnelExpired (std::shared_ptr<InboundTunnel> expiredTunnel)
 | 
						void TunnelPool::TunnelExpired (std::shared_ptr<InboundTunnel> expiredTunnel)
 | 
				
			||||||
| 
						 | 
					@ -330,7 +330,7 @@ namespace tunnel
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (num < m_NumInboundTunnels && m_NumInboundHops <= 0 && m_LocalDestination) // zero hops IB
 | 
							if (num < m_NumInboundTunnels && m_NumInboundHops <= 0 && m_LocalDestination) // zero hops IB
 | 
				
			||||||
			m_LocalDestination->SetLeaseSetUpdated (); // update LeaseSet immediately
 | 
								m_LocalDestination->SetLeaseSetUpdated (true); // update LeaseSet immediately
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void TunnelPool::TestTunnels ()
 | 
						void TunnelPool::TestTunnels ()
 | 
				
			||||||
| 
						 | 
					@ -377,10 +377,10 @@ namespace tunnel
 | 
				
			||||||
								it.second.second->SetState (eTunnelStateTestFailed);
 | 
													it.second.second->SetState (eTunnelStateTestFailed);
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
						if (failed && m_LocalDestination)
 | 
											if (failed && m_LocalDestination)
 | 
				
			||||||
							m_LocalDestination->SetLeaseSetUpdated ();
 | 
												m_LocalDestination->SetLeaseSetUpdated (true);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					if (m_LocalDestination)
 | 
										if (m_LocalDestination)
 | 
				
			||||||
						m_LocalDestination->SetLeaseSetUpdated ();
 | 
											m_LocalDestination->SetLeaseSetUpdated (true);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				else if (it.second.second->GetState () != eTunnelStateExpiring)
 | 
									else if (it.second.second->GetState () != eTunnelStateExpiring)
 | 
				
			||||||
					it.second.second->SetState (eTunnelStateTestFailed);
 | 
										it.second.second->SetState (eTunnelStateTestFailed);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue