fix: admin/internet: timeout #437
Massimo Melina committed
Feb 6, 2024 at 12:34 UTC
aa7a23b60a3350e2f22e13de6fe856eeecb9cded
1 file changed
+1
-1
src/nat.ts
+1
-1
@@ -62,7 +62,7 @@ export const getPublicIps = debounceAsync(async () => {
62
63
export const getNatInfo = debounceAsync(async () => {
64
const gettingIps = getPublicIps() // don't wait, do it in parallel
65
- const res = await upnpClient.getGateway().catch(() => null)
65
+ const res = await haveTimeout(10_000, upnpClient.getGateway()).catch(() => null)
66
const status = await getServerStatus()
67
const mappings = res && await haveTimeout(5_000, upnpClient.getMappings()).catch(() => null)
68
console.debug('mappings found', mappings?.map(x => x.description))