On Thu, Jan 17, 2013 at 1:19 AM, Branko Čibej <br...@wandisco.com> wrote:
> > 1 has not been marked as started nor been assigned but is tied to an > > open serf issue: > > 4274 DEFECT P3 All issues@subversion philip NEW > 1.8.0 serf > > client hangs when server crashes > > I reviewed this the other day and submitted > > https://code.google.com/p/serf/issues/detail?id=94 > > as I believe the root cause is in Serf itself. > > How about this? If the connection never resulted in a successful HTTP response during its current lifetime (which gets zero'd in reset_connection), then we can return an error back upstream. I think we'll still be fine on Windows as the HUP should be detected *after* the full response is read by serf. So, in this case, we should bug out after a max of 2 attempts...and maybe one if OPTIONS is the first request on the connection. -- justin Index: outgoing.c =================================================================== --- outgoing.c (revision 1716) +++ outgoing.c (working copy) @@ -1111,7 +1111,10 @@ /* The connection got reset by the server. On Windows this can happen when all data is read, so just cleanup the connection and open a new one. */ - return reset_connection(conn, 1); + if (conn->completed_responses) { + return reset_connection(conn, 1); + } + return APR_EGENERAL; } if ((events & APR_POLLERR) != 0) { /* We might be talking to a buggy HTTP server that doesn't