diff --git a/ClientContext.cpp b/ClientContext.cpp index e89e7eb7..3e33ae07 100644 --- a/ClientContext.cpp +++ b/ClientContext.cpp @@ -531,6 +531,7 @@ namespace client LogPrint (eLogInfo, "Clients: ", numClientTunnels, " I2P client tunnels created"); LogPrint (eLogInfo, "Clients: ", numServerTunnels, " I2P server tunnels created"); } + void ClientContext::ScheduleCleanupUDP() { // schedule cleanup in 1 second @@ -540,11 +541,10 @@ namespace client void ClientContext::CleanupUDP(const boost::system::error_code & ecode) { - if(!ecode) { + if(!ecode) + { std::lock_guard lock(m_ForwardsMutex); - for ( auto & s : m_ServerForwards ) { - s.second->ExpireStale(); - } + for ( auto & s : m_ServerForwards ) s.second->ExpireStale(); ScheduleCleanupUDP(); } } diff --git a/I2PTunnel.cpp b/I2PTunnel.cpp index db8831be..087221a3 100644 --- a/I2PTunnel.cpp +++ b/I2PTunnel.cpp @@ -609,9 +609,9 @@ namespace client I2PUDPServerTunnel::I2PUDPServerTunnel(const std::string & name, std::shared_ptr localDestination, const boost::asio::ip::address& localAddress, boost::asio::ip::udp::endpoint forwardTo, uint16_t port) : - m_LocalAddress(localAddress), m_Name(name), LocalPort(port), + m_LocalAddress(localAddress), m_RemoteEndpoint(forwardTo) { m_LocalDest = localDestination; @@ -639,9 +639,9 @@ namespace client m_Name(name), m_Session(nullptr), m_RemoteDest(remoteDest), - m_RemoteIdent(nullptr), m_LocalDest(localDestination), m_LocalEndpoint(localEndpoint), + m_RemoteIdent(nullptr), m_ResolveThread(nullptr), LocalPort(localEndpoint.port()), RemotePort(remotePort),