Skip to content

Commit

Permalink
Uses the `forgotten' name for abort callbacks, since it's already def…
Browse files Browse the repository at this point in the history
…ined and

means roughly the same thing.
  • Loading branch information
robotlolita committed Apr 15, 2012
1 parent 4e89740 commit 8261379
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/http.js
Expand Up @@ -104,7 +104,7 @@ var PromiseP = Promise.derive({
, forget:
function _forget() {
this.client.abort()
return this.flush('aborted').fail('aborted') }
return this.flush('forgotten').fail('forgotten') }

, timeout: support_timeout_p? function _timeout(delay) {
this.timeout = delay * 1000
Expand Down Expand Up @@ -140,7 +140,6 @@ var PromiseP = Promise.derive({
, completed : register('state:completed')

// General failure statuses
, aborted : register('aborted')
, errored : register('errored')
})

Expand Down Expand Up @@ -193,7 +192,7 @@ function request(uri, options) {

function setup_listeners() {
client.onerror = make_error_handler('errored')
client.onabort = make_error_handler('aborted')
client.onabort = make_error_handler('forgotten')
client.ontimeout = make_error_handler('timeouted')
client.onloadstart = function(ev){ promise.fire('load:start', ev) }
client.onprogress = function(ev){ promise.fire('load:progress', ev) }
Expand Down

0 comments on commit 8261379

Please sign in to comment.