Merge branch 'sp/smart-http-failure' into maint

* sp/smart-http-failure:
  remote-curl: Fix warning after HTTP failure
This commit is contained in:
Junio C Hamano 2011-11-01 15:45:16 -07:00
Родитель 5b5d92aae9 6cdf0223fe
Коммит 7fa6c90c72
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -573,7 +573,14 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
close(client.in); close(client.in);
client.in = -1; client.in = -1;
strbuf_read(&rpc->result, client.out, 0); if (!err) {
strbuf_read(&rpc->result, client.out, 0);
} else {
char buf[4096];
for (;;)
if (xread(client.out, buf, sizeof(buf)) <= 0)
break;
}
close(client.out); close(client.out);
client.out = -1; client.out = -1;