lifeemotions / knx.net

KNX.net provides a KNX API for .NET
MIT License
101 stars 47 forks source link

missing telegrams in Tunnelling #53

Open akellai opened 5 years ago

akellai commented 5 years ago

The following code in the KnxReceiverTunneling.cs is supposed to make sure you do not duplicate telegrams that were processed already:

        lock (_rxSequenceNumberLock)
        {
            if (sequenceNumber <= _rxSequenceNumber)
                process = false;

            _rxSequenceNumber = sequenceNumber;
        }

However sequenceNumber is a byte value and it gets reset after reaching 255. This results in loosing every 256th telegram. I'd rather have duplicate telegrams than missing some. Does it make sense to remove the 'process' variable and the associated logic?