Skip to content

Commit

Permalink
Merge branch 'sp/fix-smart-http-deadlock-on-error' into maint
Browse files Browse the repository at this point in the history
* sp/fix-smart-http-deadlock-on-error:
  smart-http: Don't deadlock on server failure
  • Loading branch information
Junio C Hamano committed Aug 18, 2010
2 parents 452c6d5 + b4ee10f commit 0a4139b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions remote-curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0a4139b

Please sign in to comment.