More work on connection reset stuff...

This commit is contained in:
Adam Ierymenko 2014-01-29 22:04:23 -08:00
parent d75f2f7051
commit 6e076e77d8
3 changed files with 8 additions and 4 deletions

View file

@ -67,10 +67,10 @@ Switch::~Switch()
void Switch::onRemotePacket(Demarc::Port localPort,const InetAddress &fromAddr,const Buffer<4096> &data)
{
try {
if (data.size() > ZT_PROTO_MIN_FRAGMENT_LENGTH) {
if (data.size() >= ZT_PROTO_MIN_FRAGMENT_LENGTH) {
if (data[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR)
_handleRemotePacketFragment(localPort,fromAddr,data);
else if (data.size() > ZT_PROTO_MIN_PACKET_LENGTH)
else if (data.size() >= ZT_PROTO_MIN_PACKET_LENGTH)
_handleRemotePacketHead(localPort,fromAddr,data);
}
} catch (std::exception &ex) {