inetChecksite() fix timeout
This commit is contained in:
+2
-1
@@ -425,7 +425,8 @@ function graphics(callback) {
|
||||
options.stdio = ['pipe', 'pipe', 'ignore'];
|
||||
}
|
||||
try {
|
||||
const res = execSync(cmd, options).toString();
|
||||
const sanitized = util.sanitizeShellString(cmd);
|
||||
const res = execSync(sanitized, options).toString();
|
||||
return res;
|
||||
} catch (e) {
|
||||
util.noop();
|
||||
|
||||
Vendored
+4
-1
@@ -991,8 +991,11 @@ export function diskLayout(cb?: (data: Systeminformation.DiskLayoutData[]) => an
|
||||
|
||||
export function networkInterfaceDefault(cb?: (data: string) => any): Promise<string>;
|
||||
export function networkGatewayDefault(cb?: (data: string) => any): Promise<string>;
|
||||
export function networkInterfaces(): Promise<Systeminformation.NetworkInterfacesData[]>;
|
||||
export function networkInterfaces(defaultString: 'default'): Promise<Systeminformation.NetworkInterfacesData>;
|
||||
export function networkInterfaces(rescan: boolean): Promise<Systeminformation.NetworkInterfacesData[]>;
|
||||
export function networkInterfaces(
|
||||
cb?:
|
||||
cb:
|
||||
| ((data: Systeminformation.NetworkInterfacesData[] | Systeminformation.NetworkInterfacesData) => any)
|
||||
| boolean
|
||||
| string,
|
||||
|
||||
+1
-1
@@ -2538,7 +2538,7 @@ function checkWebsite(url, timeout = 5000) {
|
||||
});
|
||||
})
|
||||
.setTimeout(timeout, () => {
|
||||
request.close();
|
||||
request.destroy();
|
||||
resolve({
|
||||
url,
|
||||
statusCode: 408,
|
||||
|
||||
Reference in New Issue
Block a user