From 0be92d776e88b761094e45021543254c6282bf35 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Tue, 29 Jul 2014 20:03:19 -0400 Subject: [PATCH] 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) --- setup/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/functions.sh b/setup/functions.sh index 126abc56..0f06f939 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -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 {