[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
Stephan Richter 2024-04-12 21:49:11 +02:00 committed by GitHub
parent 465e84d800
commit ec5b511a81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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");