summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-13 01:27:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-13 01:27:01 (GMT)
commit1c80c9b2cb5ae0d8c77f3c73730225ca19aeef4a (patch)
tree269998f9a216266ab71bcd57786aeeacf2cbffdc
parent642f7108f68ef622b338d27d94a956e32c8567dd (diff)
parentb4ee10f60fb46e0305968023c1ab0f072535b630 (diff)
downloadgit-1c80c9b2cb5ae0d8c77f3c73730225ca19aeef4a.zip
git-1c80c9b2cb5ae0d8c77f3c73730225ca19aeef4a.tar.gz
git-1c80c9b2cb5ae0d8c77f3c73730225ca19aeef4a.tar.bz2
Merge branch 'sp/fix-smart-http-deadlock-on-error'
* sp/fix-smart-http-deadlock-on-error: smart-http: Don't deadlock on server failure
-rw-r--r--remote-curl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 24fbb9a..04d4813 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -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);