mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
terminate session in separate task
This commit is contained in:
parent
6b513a0f95
commit
4b1f5c9c9b
3 changed files with 11 additions and 11 deletions
|
@ -403,7 +403,7 @@ namespace transport
|
|||
case eSSU2SessionStateSessionCreatedSent:
|
||||
if (!m_LastSession->ProcessSessionConfirmed (buf, len))
|
||||
{
|
||||
m_LastSession->Terminate ();
|
||||
m_LastSession->Done ();
|
||||
m_LastSession = nullptr;
|
||||
}
|
||||
break;
|
||||
|
@ -416,7 +416,7 @@ namespace transport
|
|||
{
|
||||
LogPrint (eLogWarning, "SSU2: HolePunch endpoint ", senderEndpoint,
|
||||
" doesn't match RelayResponse ", m_LastSession->GetRemoteEndpoint ());
|
||||
m_LastSession->Terminate ();
|
||||
m_LastSession->Done ();
|
||||
m_LastSession = nullptr;
|
||||
}
|
||||
break;
|
||||
|
@ -678,13 +678,13 @@ namespace transport
|
|||
{
|
||||
auto state = it.second->GetState ();
|
||||
if (state == eSSU2SessionStateTerminated || state == eSSU2SessionStateClosing)
|
||||
GetService ().post (std::bind (&SSU2Session::Terminate, it.second));
|
||||
it.second->Done ();
|
||||
else if (it.second->IsTerminationTimeoutExpired (ts))
|
||||
{
|
||||
if (it.second->IsEstablished ())
|
||||
it.second->RequestTermination (eSSU2TerminationReasonIdleTimeout);
|
||||
else
|
||||
GetService ().post (std::bind (&SSU2Session::Terminate, it.second));
|
||||
it.second->Done ();
|
||||
}
|
||||
else
|
||||
it.second->CleanUp (ts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue