Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
proton-0.4
-
Windows / Eclipse Juno
Description
TrackerQueue uses "int" data type for numbering deliveries and managing the window size.
tests are not coded for circular arithmetic so weirdness will start after 2^31 deliveries.
Quick fix is to make these labels long.
Slightly less quick fix is to use circular arithmetic.
in getDelivery()
if (seq < _lwm || seq > _hwm) return null;
change to
if (((seq - _lwm) < 0) || ((seq - _hwm) > 0)) return null;
in apply()
if (seq < _lwm || seq > _hwm) return;
change as above.