BACnet4J icon indicating copy to clipboard operation
BACnet4J copied to clipboard

Out of order segmented messages not reassembled correctly

Open d-shapiro opened this issue 9 years ago • 2 comments

I noticed this when trying to send a ReadRange request and read the response. In this particular case, the response came in as a segmented Complex-ACK, and the segments arrived in the order: 0, 1, 2, 5, 3, 4. However, the resulting ByteQueue was missing all of the bytes from segments 3 and 4, causing a "missing required parameter" error when trying to decode the incomplete ByteQueue. It looks like DefaultTransport assembles segments in the order they arrive, and stops assembling once a segment arrives with moreFollows = false.

d-shapiro avatar Jun 03 '16 00:06 d-shapiro

Hmm, interesting case. I will take a look. Does this happen often? I've never seen this before.

mlohbihler avatar Feb 15 '17 19:02 mlohbihler

Turns out there were a few problems with segments being received out of order. I committed a fix for this here: https://github.com/infiniteautomation/BACnet4J/commit/381b6f67e8c853b262f0411330a652d318c89e99

mlohbihler avatar Feb 16 '17 02:02 mlohbihler