Merge branch 'sp/fix-smart-http-deadlock-on-error' into maint

* sp/fix-smart-http-deadlock-on-error:
  smart-http: Don't deadlock on server failure
This commit is contained in:
Junio C Hamano 2010-08-18 16:30:11 -07:00
Родитель 452c6d506b b4ee10f60f
Коммит 0a4139b5f2
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -528,11 +528,12 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
rpc->len = n;
err |= post_rpc(rpc);
}
strbuf_read(&rpc->result, client.out, 0);
close(client.in);
close(client.out);
client.in = -1;
strbuf_read(&rpc->result, client.out, 0);
close(client.out);
client.out = -1;
err |= finish_command(&client);