mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-01-04 23:39:58 +01:00
Do not update G2 cache when nothing has been read from socket
This commit is contained in:
parent
cda4300f34
commit
9f1a1d841a
|
|
@ -89,6 +89,8 @@ bool CG2ProtocolHandler::readPackets(in_addr& incomingAddress, unsigned int& inc
|
|||
{
|
||||
m_type = GT_NONE;
|
||||
|
||||
incomingPort = 0;
|
||||
|
||||
// No more data?
|
||||
int length = m_socket.read(m_buffer, BUFFER_LENGTH, incomingAddress, incomingPort);
|
||||
if (length <= 0)
|
||||
|
|
|
|||
|
|
@ -1054,7 +1054,8 @@ void CIRCDDBGatewayThread::processG2()
|
|||
|
||||
default:
|
||||
//Probably someone punching a UDP hole to us, keep track of that
|
||||
m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort);
|
||||
if(incomingPort > 0 && incomingPort < 65536)
|
||||
m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue