mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
Destroy I2PControlSession before io_service, cancel waiting operations.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user