mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
fix: lint max-statements-per-line in resolveWithTimeout
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
This commit is contained in:
parent
dd61167c4e
commit
aa9d0e030e
@ -90,8 +90,14 @@ export async function resolveAndValidateSmtpHost(host: string): Promise<{
|
||||
reject(Object.assign(new Error(`DNS lookup timed out after ${DNS_TIMEOUT_MS}ms`), { code: "ECANCELLED" }));
|
||||
}, DNS_TIMEOUT_MS);
|
||||
fn().then(
|
||||
(result) => { clearTimeout(timer); resolve(result); },
|
||||
(err) => { clearTimeout(timer); reject(err); },
|
||||
(result) => {
|
||||
clearTimeout(timer);
|
||||
resolve(result);
|
||||
},
|
||||
(err) => {
|
||||
clearTimeout(timer);
|
||||
reject(err);
|
||||
},
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user