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