diff --git a/Streaming.cpp b/Streaming.cpp index 785e2987..4543569c 100644 --- a/Streaming.cpp +++ b/Streaming.cpp @@ -604,8 +604,8 @@ namespace stream return; } - auto ts = i2p::util::GetMillisecondsSinceEpoch (); - if (ts >= m_CurrentRemoteLease.endDate - i2p::tunnel::TUNNEL_EXPIRATION_THRESHOLD*1000) + auto ts = i2p::util::GetMillisecondsSinceEpoch (); + if (!m_CurrentRemoteLease.endDate || ts >= m_CurrentRemoteLease.endDate - i2p::tunnel::TUNNEL_EXPIRATION_THRESHOLD*1000) UpdateCurrentRemoteLease (true); if (ts < m_CurrentRemoteLease.endDate) {