Comment 12 for bug 819604

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 819604] Re: when an idle ssh transport is interrupted, bzrlib errors; should reconnect instead

I agree that there's a lot of buffering and indirection so it will be
hard to detect it for writes.

I do wonder if you could try a nonblocking select-for-read before we
start writing: if the remote end has closed, this may tell us "there's
something readable" and then the thing we read turns out to be an EOF.
 I think that is the correct semantic for determining when the remote
end has closed. However, the layers may still trip us up, if it turns
out that ssh does not close the client's stdin until the entire
connection has closed. There is a complication also if we actually
get a non-eof byte, but that is unlikely and probably could be
handled. I think this would be worth a try.