aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-18 16:30:11 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-18 16:30:11 -0700
commit0a4139b5f283ef5e817afaafd9e7e2a149220cc4 (patch)
treebb82d5f38b4677d5040ff0a7035f04366e12e4f2
parent452c6d506b1a6dcf24d4ceaa592afc39c1c1a60e (diff)
parentb4ee10f60fb46e0305968023c1ab0f072535b630 (diff)
downloadgit-0a4139b5f283ef5e817afaafd9e7e2a149220cc4.tar.gz
git-0a4139b5f283ef5e817afaafd9e7e2a149220cc4.tar.xz
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
-rw-r--r--remote-curl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 24fbb9a9b..04d4813e4 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);