Commit cd00fa3
committed
QoS 0 messages have no message id, and the tokens of these messages
are thus all stored in the token store under id 0. When multiple
messages are posted in quick succession, the token of the previous
message is overwritten in the token store. As a result, clients waiting
on this token hang, and the inFlight message count is never decreased.
This commit attaches the token to the message itself. CommsSender and
ClientState first look in the message for a token, and then, if there is
no token there, in the token store. Tokens of QoS 0 messages are never
stored in the token store.
Signed-off-by: Hylke van der Schaaf <hylke.vds@gmail.com>
1 parent 3324b9c commit cd00fa3
3 files changed
Lines changed: 40 additions & 5 deletions
File tree
- org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal
- wire
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
| 505 | + | |
| 506 | + | |
506 | 507 | | |
507 | 508 | | |
508 | 509 | | |
| |||
526 | 527 | | |
527 | 528 | | |
528 | 529 | | |
| 530 | + | |
529 | 531 | | |
530 | 532 | | |
531 | 533 | | |
532 | 534 | | |
| 535 | + | |
533 | 536 | | |
534 | 537 | | |
535 | | - | |
536 | 538 | | |
537 | 539 | | |
538 | 540 | | |
| |||
898 | 900 | | |
899 | 901 | | |
900 | 902 | | |
901 | | - | |
902 | | - | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
903 | 908 | | |
904 | 909 | | |
905 | 910 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
68 | 77 | | |
69 | 78 | | |
70 | 79 | | |
| |||
386 | 395 | | |
387 | 396 | | |
388 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
389 | 416 | | |
390 | 417 | | |
391 | 418 | | |
| |||
0 commit comments