inetChecksite() fix timeout

This commit is contained in:
Sebastian Hildebrandt
2024-12-24 13:17:34 +01:00
parent 93d9141000
commit c2ffa57a14
4 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -2487,7 +2487,7 @@ function checkWebsite(url, timeout = 5000) {
const http = ((url.startsWith('https:') || url.indexOf(':443/') > 0 || url.indexOf(':8443/') > 0) ? require('https') : require('http'));
const t = Date.now();
return new Promise((resolve) => {
http
const request = http
.get(url, { rejectUnauthorized: false }, function (res) {
res.on('data', () => { });
res.on('end', () => {