inetLatency() Windows fix

This commit is contained in:
Sebastian Hildebrandt
2019-02-05 17:59:25 +01:00
parent 8df7d8a93a
commit ee338f786a
4 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ function inetLatency(host, callback) {
let lines = stdout.toString().split('\r\n');
lines.shift();
lines.forEach(function (line) {
if (line.toLowerCase().startsWith(' min')) {
if (line.toLowerCase().indexOf('ms,') > -1) {
let l = line.replace(/ +/g, ' ').split(' ');
if (l.length > 8) {
result = parseFloat(l[9]);