diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-08-06 14:19:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-06 15:30:16 -0700 |
commit | b4ee10f60fb46e0305968023c1ab0f072535b630 (patch) | |
tree | 6960e8625cdd0b4d1e3e6b812d56d6244a016972 /csum-file.c | |
parent | 4133fd25525022f99d2c7ba339618433bdd919fe (diff) | |
download | git-b4ee10f60fb46e0305968023c1ab0f072535b630.tar.gz |
smart-http: Don't deadlock on server failure
If the remote HTTP server fails (e.g. returns 404 or 500) when we
posted the RPC to it, we won't have sent anything to the background
Git process that is supposed to handle the stream. Because we
didn't send anything, its waiting for input from remote-curl, and
remote-curl cannot read its response payload because doing so would
lead to a deadlock.
Send the background task EOF on its input before we try to read
its response back, that way it will break out of its read loop
and terminate.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'csum-file.c')
0 files changed, 0 insertions, 0 deletions