mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 12:47:48 +02:00
Destroy I2PControlSession before io_service, cancel waiting operations.
This commit is contained in:
parent
9cca01d159
commit
c7f4a79b2c
4 changed files with 28 additions and 5 deletions
|
@ -122,6 +122,17 @@ I2PControlSession::I2PControlSession(boost::asio::io_service& ios)
|
|||
routerManagerHandlers[I2P_CONTROL_ROUTER_MANAGER_RESEED] = &I2PControlSession::handleReseed;
|
||||
}
|
||||
|
||||
I2PControlSession::~I2PControlSession()
|
||||
{
|
||||
stop();
|
||||
}
|
||||
|
||||
void I2PControlSession::stop()
|
||||
{
|
||||
boost::system::error_code e; // Make sure this doesn't throw
|
||||
shutdownTimer.cancel(e);
|
||||
}
|
||||
|
||||
I2PControlSession::Response I2PControlSession::handleRequest(std::stringstream& request)
|
||||
{
|
||||
boost::property_tree::ptree pt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue