Commit 587e2ee
committed
Callbacks when a stanza is ack'd or fails to send
This adds two new callbacks, one of which runs with a stanza id when a
stanza sends and gets an sm ack from the server, and one which runs with
a stanza id when a stanza fails and will not be retried.
Incomplete and presented for discussion of the design.
An id element has been added to the send/sm queue in order to facilitate
passing this to the callback without re-parsing the stanza.
This is also added to the sm serialization, though we could parse the
stanza on restore to avoid this I suppose.
TODO: ack everything we get told about on resumed, see #251
TODO: fail everything in the queue on resume failure, or stream end1 parent a2b3b6b commit 587e2ee
3 files changed
Lines changed: 65 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
333 | 338 | | |
334 | 339 | | |
335 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
1279 | 1281 | | |
1280 | 1282 | | |
1281 | 1283 | | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1282 | 1300 | | |
1283 | 1301 | | |
1284 | 1302 | | |
| |||
1324 | 1342 | | |
1325 | 1343 | | |
1326 | 1344 | | |
1327 | | - | |
| 1345 | + | |
1328 | 1346 | | |
1329 | 1347 | | |
1330 | 1348 | | |
| |||
1454 | 1472 | | |
1455 | 1473 | | |
1456 | 1474 | | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1457 | 1480 | | |
1458 | 1481 | | |
1459 | 1482 | | |
1460 | 1483 | | |
| 1484 | + | |
| 1485 | + | |
1461 | 1486 | | |
1462 | 1487 | | |
1463 | 1488 | | |
| |||
1563 | 1588 | | |
1564 | 1589 | | |
1565 | 1590 | | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
1566 | 1602 | | |
1567 | 1603 | | |
1568 | 1604 | | |
| |||
1813 | 1849 | | |
1814 | 1850 | | |
1815 | 1851 | | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
1816 | 1856 | | |
1817 | 1857 | | |
1818 | 1858 | | |
| |||
2088 | 2128 | | |
2089 | 2129 | | |
2090 | 2130 | | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
2091 | 2134 | | |
2092 | 2135 | | |
2093 | 2136 | | |
| |||
2115 | 2158 | | |
2116 | 2159 | | |
2117 | 2160 | | |
| 2161 | + | |
2118 | 2162 | | |
2119 | 2163 | | |
2120 | 2164 | | |
| |||
2231 | 2275 | | |
2232 | 2276 | | |
2233 | 2277 | | |
2234 | | - | |
| 2278 | + | |
2235 | 2279 | | |
2236 | 2280 | | |
2237 | 2281 | | |
| |||
2266 | 2310 | | |
2267 | 2311 | | |
2268 | 2312 | | |
2269 | | - | |
| 2313 | + | |
2270 | 2314 | | |
2271 | 2315 | | |
2272 | 2316 | | |
| |||
2300 | 2344 | | |
2301 | 2345 | | |
2302 | 2346 | | |
2303 | | - | |
| 2347 | + | |
2304 | 2348 | | |
2305 | 2349 | | |
2306 | 2350 | | |
| |||
2342 | 2386 | | |
2343 | 2387 | | |
2344 | 2388 | | |
| 2389 | + | |
2345 | 2390 | | |
2346 | 2391 | | |
2347 | 2392 | | |
| |||
2358 | 2403 | | |
2359 | 2404 | | |
2360 | 2405 | | |
| 2406 | + | |
2361 | 2407 | | |
2362 | 2408 | | |
2363 | 2409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
451 | 461 | | |
452 | 462 | | |
453 | 463 | | |
| |||
0 commit comments