shorten connection timeout for http interactions with containers

This issue came to light in the context of `weave launch`. When the
weaver container died after we've completed network configuration, it
would take a minute for the script to terminate, due to `curl` being
stuck in a connection attempt.

Fixes #538.
This commit is contained in:
Matthias Radestock committed 2015-04-10 15:33:11 +01:00
1 parent db302a0d3d
commit 0799d9f70b
1 file changed
+1 -1
+1 -1
View File
@@ -429,7 +429,7 @@ http_call_ip() {
http_verb="$3"
url="$4"
shift 4
curl -s -X $http_verb "$@" http://$ip:$port$url
curl --connect-timeout 3 -s -X $http_verb "$@" http://$ip:$port$url
}
# Perform operation $1 on container ID $2 to local DNS database at address $3