dhruvbird/node-xmpp-bosh — comment on commit 439fdda3fe09a69f5af011c7eb6cbf7b7fbcde2b
File: src/session.js line 423
By dhruvbird:

Currently, _get_highest_rid_to_ack() adds stuff to unacked_responses (has a side effect). This seems to be totally off. The name doesn't suggest that it does something that mutates internal state.

Additionally, there is also a bug where you might not return anything!