let the client check if a connection is still established and for the correct peer address before processing data. Closes #1356

This commit is contained in:
oy 2015-07-02 22:13:44 +02:00
parent cc2dcd865a
commit cbe133dce0

View file

@ -83,7 +83,8 @@ int CNetClient::Recv(CNetChunk *pChunk)
}
else
{
if(m_Connection.Feed(&m_RecvUnpacker.m_Data, &Addr))
if(m_Connection.State() != NET_CONNSTATE_OFFLINE && m_Connection.State() != NET_CONNSTATE_ERROR && net_addr_comp(m_Connection.PeerAddress(), &Addr) == 0
&& m_Connection.Feed(&m_RecvUnpacker.m_Data, &Addr))
m_RecvUnpacker.Start(&Addr, &m_Connection, 0);
}
}