BOSH: prevent pendingElements to be added to if HttpSession is closed
Description
When a BOSH session (HttpSession) is closed, it should be impossible for stanzas to be ‘scheduled for delivery’ by having them added to the pendingElements field. I suspect that the current implementation does not prevent this from happening (it’s not fully thread-safe in that respect), which could lead to stanzas being ‘pending’ forever.
Instead, failDelivery() (or something similar) should be invoked for these stanzas, which will make sure that these stanzas are processed, as opposed to remain in limbo.
When a BOSH session (
HttpSession
) is closed, it should be impossible for stanzas to be ‘scheduled for delivery’ by having them added to thependingElements
field. I suspect that the current implementation does not prevent this from happening (it’s not fully thread-safe in that respect), which could lead to stanzas being ‘pending’ forever.Instead,
failDelivery()
(or something similar) should be invoked for these stanzas, which will make sure that these stanzas are processed, as opposed to remain in limbo.