[network] Fix NumberFormatException for ping when locale has comma as decimal separator (#16636)
* fixing bug: LatencyParser fails to parse ping times on systems with comma (,) set as decimal separator Signed-off-by: Stephan Richter <s.richter@srsoftware.de>pull/16647/head
parent
465e84d800
commit
ec5b511a81
|
@ -55,7 +55,7 @@ public class LatencyParser {
|
|||
|
||||
Matcher m = LATENCY_PATTERN.matcher(inputLine);
|
||||
if (m.find() && m.groupCount() == 1) {
|
||||
return millisToDuration(Double.parseDouble(m.group(1)));
|
||||
return millisToDuration(Double.parseDouble(m.group(1).replace(",", ".")));
|
||||
}
|
||||
|
||||
logger.debug("Did not find a latency value");
|
||||
|
|
Loading…
Reference in New Issue