In its error function, the object passed to MessageBus.ajax checks to see if statusText === "abort". If it is, then a relatively low value gets used for the poll interval.
Compare https://github.com/SamSaffron/message_bus/blob/master/assets/message-bus.js#L267
and https://github.com/SamSaffron/message_bus/blob/master/assets/message-bus.js#L281
It looks like setting statusText to "abort" is something that jQuery does, not the browser. Which results in a potentially long delay between when a request is aborted (e.g. by subscribing to or unsubscribing from a channel) and when the subscriber receives new messages.
I think the message-bus-ajax.js fallback should somehow make sure to pass "abort" as the value for statusText or alternatively the error function could use a different way to determine whether or not the XHR has been aborted.
In its
errorfunction, the object passed toMessageBus.ajaxchecks to see ifstatusText === "abort". If it is, then a relatively low value gets used for the poll interval.Compare https://github.com/SamSaffron/message_bus/blob/master/assets/message-bus.js#L267
and https://github.com/SamSaffron/message_bus/blob/master/assets/message-bus.js#L281
It looks like setting
statusTextto"abort"is something that jQuery does, not the browser. Which results in a potentially long delay between when a request is aborted (e.g. by subscribing to or unsubscribing from a channel) and when the subscriber receives new messages.I think the message-bus-ajax.js fallback should somehow make sure to pass
"abort"as the value forstatusTextor alternatively theerrorfunction could use a different way to determine whether or not the XHR has been aborted.