Skip to content

Commit 0a4139b

Browse files
committed
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
2 parents 452c6d5 + b4ee10f commit 0a4139b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

remote-curl.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,12 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
528528
rpc->len = n;
529529
err |= post_rpc(rpc);
530530
}
531-
strbuf_read(&rpc->result, client.out, 0);
532531

533532
close(client.in);
534-
close(client.out);
535533
client.in = -1;
534+
strbuf_read(&rpc->result, client.out, 0);
535+
536+
close(client.out);
536537
client.out = -1;
537538

538539
err |= finish_command(&client);

0 commit comments

Comments
 (0)