Eliminate race from call_weave; call check_running only after curl fails
This commit is contained in:
1 parent
ff4d0dae70
commit
934ec2467d
1 file changed
+8
-2
@@ -1080,8 +1080,14 @@ http_call_unix() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
call_weave() {
|
call_weave() {
|
||||||
check_running $CONTAINER_NAME || return 1
|
TMPERR=/tmp/call_weave_err_$$
|
||||||
http_call $HTTP_ADDR "$@"
|
retval=0
|
||||||
|
http_call $HTTP_ADDR "$@" 2>$TMPERR || retval=$?
|
||||||
|
if [ $retval -ne 0 ] ; then
|
||||||
|
check_running $CONTAINER_NAME && cat $TMPERR >&2
|
||||||
|
fi
|
||||||
|
rm -f $TMPERR
|
||||||
|
return $retval
|
||||||
}
|
}
|
||||||
|
|
||||||
death_msg() {
|
death_msg() {
|
||||||
|
|||||||
Reference in new issue
Block a user