From 0799d9f70ba9a3c13a01ce199fbe5b34b81950ca Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 10 Apr 2015 15:33:11 +0100 Subject: [PATCH] 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. --- weave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave b/weave index 3e6c83a6..bdaf9283 100755 --- a/weave +++ b/weave @@ -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