From 68b0775e4bd431334a3975eb12929738d3566aff Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 3 Sep 2016 15:35:42 -0400 Subject: [PATCH] update datagram path logic --- Datagram.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Datagram.cpp b/Datagram.cpp index 0802295a..1a97afc5 100644 --- a/Datagram.cpp +++ b/Datagram.cpp @@ -221,6 +221,11 @@ namespace datagram { // try to get one if(m_RemoteLeaseSet) m_RoutingSession = m_LocalDestination->GetRoutingSession(m_RemoteLeaseSet, true); + else + { + UpdateLeaseSet(msg); + return; + } } // do we have a routing session? if(m_RoutingSession) @@ -261,7 +266,7 @@ namespace datagram } auto now = i2p::util::GetMillisecondsSinceEpoch (); // if this path looks dead reset the routing path since we didn't seem to be able to get a path in time - if (now - m_LastPathChange >= DATAGRAM_SESSION_PATH_TIMEOUT ) ResetRoutingPath(); + if (m_LastPathChange && now - m_LastPathChange >= DATAGRAM_SESSION_PATH_TIMEOUT ) ResetRoutingPath(); UpdateLeaseSet(msg); }