mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
reopen socked and restart receiver on exception
This commit is contained in:
@@ -160,6 +160,13 @@ namespace transport
|
|||||||
catch (std::exception& ex)
|
catch (std::exception& ex)
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "SSU: receivers runtime exception: ", ex.what ());
|
LogPrint (eLogError, "SSU: receivers runtime exception: ", ex.what ());
|
||||||
|
if (m_IsRunning)
|
||||||
|
{
|
||||||
|
// restart socket
|
||||||
|
m_Socket.close ();
|
||||||
|
OpenSocket ();
|
||||||
|
Receive ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,6 +182,12 @@ namespace transport
|
|||||||
catch (std::exception& ex)
|
catch (std::exception& ex)
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "SSU: v6 receivers runtime exception: ", ex.what ());
|
LogPrint (eLogError, "SSU: v6 receivers runtime exception: ", ex.what ());
|
||||||
|
if (m_IsRunning)
|
||||||
|
{
|
||||||
|
m_SocketV6.close ();
|
||||||
|
OpenSocketV6 ();
|
||||||
|
ReceiveV6 ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user