Fix bug IPv6 ping
This commit is contained in:
1 parent
13ff0724e7
commit
5f44f6597c
1 file changed
+1
@@ -35,6 +35,7 @@ export function ping(
|
|||||||
callback: (err: Error, res?: PingResult, stdout?: string) => void
|
callback: (err: Error, res?: PingResult, stdout?: string) => void
|
||||||
): void {
|
): void {
|
||||||
let cmd: string, parseRegExp1: RegExp, parseRegExp2: RegExp;
|
let cmd: string, parseRegExp1: RegExp, parseRegExp2: RegExp;
|
||||||
|
host = host.replace("[", "").replace("]", "");
|
||||||
switch (platform()) {
|
switch (platform()) {
|
||||||
case "linux":
|
case "linux":
|
||||||
cmd = `ping -w 1 -i 0.2 -c 3 ${host}`;
|
cmd = `ping -w 1 -i 0.2 -c 3 ${host}`;
|
||||||
|
|||||||
Reference in new issue
Block a user