Iperity / node-strophe

[?] A Node.js compatible version of Strophe.js, borrowed from https://github.com/dhruvbird/node-xmpp-bosh.
7 stars 12 forks source link

xhr state might change in subsequence call on this function #5

Open namgk opened 6 years ago

namgk commented 6 years ago

This function here

https://github.com/Iperity/node-strophe/blob/c06c157b1b97f3365a2571d48a9c0fed221e0a34/strophe.js#L2218

is triggered also by the setTimeout function. In that case, the xhr state might change, sometime result in the following error:

Error: INVALID_STATE_ERR: connection must be opened before send() is called