Permalink
Browse files

Timeout to 2 seconds on ping as we were geting random "failures"

  • Loading branch information...
1 parent 1b85554 commit 48712b7a05a55bdee03c7b69b8ce6ff81ccf8e1e @ErebusBat committed Dec 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 framework/network.rb
View
@@ -69,7 +69,7 @@ def self.default_gateway
def self.ping host
return nil if host.to_s.empty?
- ping = `ping -c 1 -t 1 #{host} 2>&1`
+ ping = `ping -c 1 -t 2 #{host} 2>&1`
return nil if ping =~ /Unknown host$/i
return -1 if ping =~ /100(?:\.0)?% packet loss/i
m = /time=(\d+(?:\.\d+)) ms/i.match ping

0 comments on commit 48712b7

Please sign in to comment.