[MERGE] Fix infinite busy-loop caused by connection loss during read of response body in HPSS v1 and v2.

Martin Pool mbp at canonical.com
Mon Jun 2 03:15:03 BST 2008


Martin Pool has voted tweak.
Status is now: Conditionally approved
Comment:
+            if bytes == '':
+                # end of file encountered reading from server
+                raise errors.ConnectionReset(
+                    "Connection lost while reading response body.")
              _body_decoder.accept_bytes(bytes)

To be a bit pedantic, this is not really "connection reset" (ie 
ECONNRESET), but rather "unexpected end of stream" or "connection closed 
unexpectedly".  We may never want to handle them differently 
programmatically but it's good to at least be precise to the user to 
help debugging.

Did you check if this could happen in the server code too?

For details, see: 
http://bundlebuggy.aaronbentley.com/request/%3C20080602011607.GA27779%40steerpike.home.puzzling.org%3E



More information about the bazaar mailing list