mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 11:04:00 +01:00
close client socket if I2P gets closed
This commit is contained in:
parent
dda80703d2
commit
fbe6c22884
|
@ -30,6 +30,7 @@ namespace stream
|
|||
|
||||
void I2PTunnelConnection::Terminate ()
|
||||
{
|
||||
m_Socket->close ();
|
||||
// TODO: remove from I2PTunnel
|
||||
}
|
||||
|
||||
|
@ -58,6 +59,13 @@ namespace stream
|
|||
|
||||
void I2PTunnelConnection::HandleWrite (const boost::system::error_code& ecode)
|
||||
{
|
||||
if (ecode)
|
||||
{
|
||||
LogPrint ("I2PTunnel write error: ", ecode.message ());
|
||||
m_Stream->Close ();
|
||||
Terminate ();
|
||||
}
|
||||
else
|
||||
StreamReceive ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue