Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Merge branch 'xhr_timeout' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Tomlinson committed Oct 26, 2011
2 parents 82a5f71 + c49f776 commit d856fac
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions browserid/static/dialog/resources/network.js
Expand Up @@ -37,8 +37,7 @@
BrowserID.Network = (function() {
"use strict";

var XHR_TIMEOUT = 10000,
csrf_token,
var csrf_token,
xhr = $,
server_time,
auth_status,
Expand Down Expand Up @@ -71,8 +70,7 @@ BrowserID.Network = (function() {
// to debug.
success: deferResponse(options.success),
error: deferResponse(xhrError(options.error, options.errorMessage)),
dataType: "json",
timeout: XHR_TIMEOUT
dataType: "json"
});
}

Expand All @@ -92,8 +90,7 @@ BrowserID.Network = (function() {
// that are thrown in the response handlers and it becomes very difficult
// to debug.
success: deferResponse(options.success),
error: deferResponse(xhrError(options.error, options.errorMessage)),
timeout: XHR_TIMEOUT
error: deferResponse(xhrError(options.error, options.errorMessage))
});
}, options.error);
}
Expand All @@ -112,8 +109,7 @@ BrowserID.Network = (function() {
auth_status = result.authenticated;
cb();
},
error: deferResponse(xhrError(onFailure)),
timeout: XHR_TIMEOUT
error: deferResponse(xhrError(onFailure))
});
}
}
Expand Down

0 comments on commit d856fac

Please sign in to comment.