# HG changeset patch # User Mahlon E. Smith # Date 1523555457 25200 # Node ID 919f139d2931aef2f5639df7878676fba95a3679 # Parent f82534b40e064dbbfe7089ecb41324da3bd350ed Fix the matcher for slower responses. diff -r f82534b40e06 -r 919f139d2931 lib/arborist/monitor/fping.rb --- a/lib/arborist/monitor/fping.rb Tue Mar 27 14:30:38 2018 -0700 +++ b/lib/arborist/monitor/fping.rb Thu Apr 12 10:50:57 2018 -0700 @@ -61,13 +61,14 @@ def handle_results( pid, stdout, stderr ) # 8.8.8.8 is alive (32.1 ms) # 8.8.4.4 is alive (14.9 ms) + # 1.1.1.1 is alive (236 ms) # 8.8.0.1 is unreachable return stdout.each_line.with_object({}) do |line, hash| address, remainder = line.split( ' ', 2 ) identifier = self.identifiers[ address ] or next - if remainder =~ /is alive \((\d+\.\d+) ms\)/ + if remainder =~ /is alive \((\d+(?:\.\d+)?) ms\)/ hash[ identifier ] = { rtt: Float( $1 ) } else hash[ identifier ] = { error: remainder.chomp }