mirror of
https://github.com/moda-gov-tw/tw-did.git
synced 2026-01-10 13:17:55 -05:00
fix: increased timeout to 50 secs
This commit is contained in:
@@ -118,12 +118,15 @@ Strategy.prototype.authenticate = async function (req) {
|
||||
try {
|
||||
let result;
|
||||
const startTime = Date.now();
|
||||
const timeout = 20000; // 20 secs
|
||||
const timeout = 50;
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
if (Date.now() - startTime >= timeout) {
|
||||
throw new TimeoutError('Operation timed out after 20 seconds');
|
||||
if (Date.now() - startTime >= timeout * 1000) {
|
||||
return this.fail(
|
||||
{ message: `Operation timed out after ${timeout} seconds` },
|
||||
408
|
||||
);
|
||||
}
|
||||
|
||||
await delay(4000);
|
||||
|
||||
Reference in New Issue
Block a user