mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
don't send message through non-established session
This commit is contained in:
parent
e07a20a771
commit
da7e2f2580
1 changed files with 3 additions and 3 deletions
|
@ -295,11 +295,11 @@ namespace datagram
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_RoutingSession || !m_RoutingSession->GetOwner ())
|
if (!m_RoutingSession || !m_RoutingSession->GetOwner () || !m_RoutingSession->IsReadyToSend ())
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (auto& it: m_PendingRoutingSessions)
|
for (auto& it: m_PendingRoutingSessions)
|
||||||
if (it->GetOwner ()) // found established session
|
if (it->GetOwner () && m_RoutingSession->IsReadyToSend ()) // found established session
|
||||||
{
|
{
|
||||||
m_RoutingSession = it;
|
m_RoutingSession = it;
|
||||||
m_PendingRoutingSessions.clear ();
|
m_PendingRoutingSessions.clear ();
|
||||||
|
@ -309,7 +309,7 @@ namespace datagram
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
m_RoutingSession = m_LocalDestination->GetRoutingSession(m_RemoteLeaseSet, true);
|
m_RoutingSession = m_LocalDestination->GetRoutingSession(m_RemoteLeaseSet, true);
|
||||||
if (!m_RoutingSession->GetOwner ())
|
if (!m_RoutingSession->GetOwner () || !m_RoutingSession->IsReadyToSend ())
|
||||||
m_PendingRoutingSessions.push_back (m_RoutingSession);
|
m_PendingRoutingSessions.push_back (m_RoutingSession);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue