put a 15-second timeout in asking icanhazip.com for our IP address, although this limit does not seem to actually work (i.e. if I set the limit to 5 seconds, curl still hangs 10+ when I turn off my network connection)

This commit is contained in:
Joshua Tauberer 2014-07-29 20:03:19 -04:00
parent 168c06939d
commit 0be92d776e
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ function get_publicip_from_web_service {
#
# Pass '4' or '6' as an argument to this function to specify
# what type of address to get (IPv4, IPv6).
curl -$1 --fail --silent icanhazip.com 2>/dev/null
curl -$1 --fail --silent --max-time 15 icanhazip.com 2>/dev/null
}
function get_default_privateip {