post work to io service

This commit is contained in:
Jeff Becker 2016-08-22 13:04:36 -04:00
parent bee34a3222
commit f5e2899275
No known key found for this signature in database
GPG key ID: AB950234D6EA286B
3 changed files with 19 additions and 12 deletions

View file

@ -87,9 +87,6 @@ namespace client
LogPrint(eLogError, "Clients: Exception in SOCKS Proxy: ", e.what());
}
}
// I2P tunnels
ReadTunnels ();
if ( m_ServiceThread == nullptr ) {
m_ServiceThread = new std::thread([&] () {
@ -99,7 +96,11 @@ namespace client
});
ScheduleCleanupUDP();
}
// I2P tunnels
ReadTunnels ();
// SAM
bool sam; i2p::config::GetOption("sam.enabled", sam);
@ -468,6 +469,7 @@ namespace client
std::make_pair(
localDestination->GetIdentHash(), port),
std::unique_ptr<I2PUDPServerTunnel>(serverTunnel))).second) {
serverTunnel->Start();
LogPrint(eLogInfo, "Clients: I2P Server Forward created for UDP Endpoint ", host, ":", port, " via ",localDestination->GetIdentHash().ToBase32());
} else {
LogPrint(eLogError, "Clients: I2P Server Forward for destination/port ", m_AddressBook.ToAddress(localDestination->GetIdentHash()), "/", port, "already exists");