@samitouri / QOSami-HFS / commits / 4eb08ea3

fix: error "All promises were rejected"

Massimo Melina committed Oct 8, 2023 at 00:45 UTC 4eb08ea3ef8ebe6dfecf59ec64b2d3234fef697f
1 file changed +1 -1
src/api.net.ts
+1 -1
@@ -190,7 +190,7 @@ async function checkPort(ip: string, port: number) {
190 console.log(`checking server ${ip}:${port}`)
191 for (const services of _.chunk(_.shuffle<PortScannerService>(prjInfo.checkServerServices), 2)) {
192 try {
193 - return Promise.any(services.map(async ({ url, body, selector, regexpSuccess, regexpFailure, ...rest }) => {
193 + return await Promise.any(services.map(async ({ url, body, selector, regexpSuccess, regexpFailure, ...rest }) => {
194 const service = new URL(url).hostname
195 console.log('trying service', service)
196 const res = await httpString(applySymbols(url)!, { family: isIPv6(ip) ? 6 : 4, body: applySymbols(body), ...rest })