dhruvbird/node-xmpp-bosh — comment on commit 9f0b359c4349d301a15e67d5fefc58a371b120e2
File: src/session.js line 1015
By dhruvbird:

hmm... I see your point. It makes sense.
1. current_RID is only ever incremented by 1, so to start off with, there are no queued requests with rid < current_RID + 1.
2. If current_RID increases by 1, then at most 1 request will become < current_RID + 1.
3. This holds since current_RID is updated _after_ handling broken connections.

I think we can fix it. But it would be great if you can have an assertion which loops over every entry in queued_requests to validate what we think is true (at least for a week or so...) (y)