mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-21 16:49:10 +01:00
fixed crash on termination
This commit is contained in:
parent
517a7ba3ab
commit
08762870b4
1 changed files with 10 additions and 3 deletions
7
SAM.h
7
SAM.h
|
@ -76,6 +76,7 @@ namespace client
|
||||||
|
|
||||||
boost::asio::ip::tcp::socket& GetSocket () { return m_Socket; };
|
boost::asio::ip::tcp::socket& GetSocket () { return m_Socket; };
|
||||||
void ReceiveHandshake ();
|
void ReceiveHandshake ();
|
||||||
|
void SetSocketType (SAMSocketType socketType) { m_SocketType = socketType; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -126,6 +127,12 @@ namespace client
|
||||||
{
|
{
|
||||||
ClientDestination * localDestination;
|
ClientDestination * localDestination;
|
||||||
std::list<std::shared_ptr<SAMSocket> > sockets;
|
std::list<std::shared_ptr<SAMSocket> > sockets;
|
||||||
|
|
||||||
|
~SAMSession ()
|
||||||
|
{
|
||||||
|
for (auto it: sockets)
|
||||||
|
it->SetSocketType (eSAMSocketTypeTerminated);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class SAMBridge
|
class SAMBridge
|
||||||
|
|
Loading…
Add table
Reference in a new issue