Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lahmatiy/5891591 to your computer and use it in GitHub Desktop.
Save lahmatiy/5891591 to your computer and use it in GitHub Desktop.
Patch that emit failure event before abort event for AbstractRequest. This behaviour was changed in 0.9.4
basis.require('basis.event');
basis.require('basis.data');
basis.require('basis.net');
basis.net.AbstractRequest.extend({
stateOnAbort: basis.data.STATE.ERROR,
emit_abort: function(){
this.emit_failure();
basis.event.events.abort.call(this);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment