Browse Source

read more than 1 udp packet

pull/715/head
Jeff Becker 8 years ago
parent
commit
3d07ddfba5
  1. 6
      I2PTunnel.cpp

6
I2PTunnel.cpp

@ -697,8 +697,13 @@ namespace client @@ -697,8 +697,13 @@ namespace client
void I2PUDPClientTunnel::HandleRecvFromLocal(const boost::system::error_code & ec, std::size_t transferred)
{
if(ec) {
LogPrint(eLogError, "UDP Client: ", ec.message());
return;
}
if(!m_RemoteIdent) {
LogPrint(eLogWarning, "UDP Client: remote endpoint not resolved yet");
RecvFromLocal();
return; // drop, remote not resolved
}
auto remotePort = m_RecvEndpoint.port();
@ -712,6 +717,7 @@ namespace client @@ -712,6 +717,7 @@ namespace client
m_LocalDest->GetDatagramDestination()->SendDatagramTo(m_RecvBuff, transferred, *m_RemoteIdent, remotePort, RemotePort);
// mark convo as active
m_Sessions[remotePort].second = i2p::util::GetMillisecondsSinceEpoch();
RecvFromLocal();
}
std::vector<std::shared_ptr<DatagramSessionInfo> > I2PUDPClientTunnel::GetSessions()

Loading…
Cancel
Save