summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--remote-curl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 3edbf57..5416891 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -505,11 +505,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);