no timeout
This commit is contained in:
parent
215d3f0e92
commit
2c0b757c13
|
@ -1030,11 +1030,10 @@
|
|||
}
|
||||
|
||||
var timeout = opts.timeout;
|
||||
if (opts.debug) {
|
||||
timeout = timeout || 3 * 60 * 1000;
|
||||
if ('background' === windowType) {
|
||||
if (!timeout) {
|
||||
timeout = 7 * 1000;
|
||||
}
|
||||
else {
|
||||
timeout = timeout || ('background' === windowType ? 15 * 1000 : 3 * 60 * 1000);
|
||||
}
|
||||
|
||||
return new OAUTH3.PromiseA(function (resolve, reject) {
|
||||
|
@ -1056,6 +1055,7 @@
|
|||
cleanup();
|
||||
};
|
||||
|
||||
if (timeout) {
|
||||
tok = setTimeout(function () {
|
||||
var err = new Error(
|
||||
"the '" + windowType + "' request did not complete within " + Math.round(timeout / 1000) + "s"
|
||||
|
@ -1064,6 +1064,7 @@
|
|||
reject(err);
|
||||
cleanup();
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
if (!OAUTH3._browser._frames[state]) {
|
||||
|
|
Loading…
Reference in New Issue