Commit 6f76113
committed
MQTT: fix a very timing-sensitive issue around Last Will and expiration
When Will-Delay-Interval >= Session-Expiry-Interval, the will queue's
x-expires and the will message TTL were only ~5 ms apart. Under a
loaded scheduler the queue could be deleted before the dead-letter
path ran, silently dropping the will.
Extend x-expires by a fixed 1 s margin. Strictly additive; the
SessionExpiry = infinity case is unchanged.1 parent 8e90c42 commit 6f76113
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
1812 | 1813 | | |
1813 | 1814 | | |
1814 | 1815 | | |
1815 | | - | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
1816 | 1825 | | |
1817 | 1826 | | |
1818 | 1827 | | |
| |||
0 commit comments