提交 98c2924c 编写于 作者: C Clemens Buchacher 提交者: Junio C Hamano

credentials: unable to connect to cache daemon

Error out if we just spawned the daemon and yet we cannot connect.

And always release the string buffer.
Signed-off-by: NClemens Buchacher <drizzd@aon.at>
Acked-by: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 861444f6
......@@ -71,11 +71,10 @@ static void do_cache(const char *socket, const char *action, int timeout,
die_errno("unable to relay credential");
}
if (!send_request(socket, &buf))
return;
if (flags & FLAG_SPAWN) {
if (send_request(socket, &buf) < 0 && (flags & FLAG_SPAWN)) {
spawn_daemon(socket);
send_request(socket, &buf);
if (send_request(socket, &buf) < 0)
die_errno("unable to connect to cache daemon");
}
strbuf_release(&buf);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册