Commit 17ff22b
committed
OF-3176: Fix stanza loss during outgoing S2S session teardown
When an outgoing server-to-server (S2S) connection closes, the connection is marked closed immediately, but route removal from the routing table happens asynchronously during teardown. This creates a short race window where routing can still send stanzas to a closing session, which then sees a closed connection and drops the stanza.
This change fixes that behavior by waiting for teardown to fully complete before re-routing a stanza that reached a closed outgoing session. Waiting for close completion ensures stale route cleanup has finished, after which normal routing can use an existing replacement session or create a new one.
A new system property, xmpp.server.session.redelivery-timeout (default: 30 seconds), controls how long Openfire waits for teardown completion before returning an error to the sender.1 parent 35901a4 commit 17ff22b
File tree
3 files changed
+50
-3
lines changed- i18n/src/main/resources
- xmppserver/src/main/java/org/jivesoftware/openfire/session
3 files changed
+50
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1325 | 1325 | | |
1326 | 1326 | | |
1327 | 1327 | | |
| 1328 | + | |
1328 | 1329 | | |
1329 | 1330 | | |
1330 | 1331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
| 1236 | + | |
1236 | 1237 | | |
1237 | 1238 | | |
1238 | 1239 | | |
| |||
Lines changed: 48 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
| |||
326 | 336 | | |
327 | 337 | | |
328 | 338 | | |
329 | | - | |
330 | | - | |
331 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
332 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
333 | 378 | | |
334 | 379 | | |
335 | 380 | | |
| |||
0 commit comments