mercurial/httpclient/__init__.py
changeset 14293 9adbb5ef0964
parent 14243 861f28212398
child 14341 5c3de67e7402
--- a/mercurial/httpclient/__init__.py	Wed May 11 11:04:44 2011 +0200
+++ b/mercurial/httpclient/__init__.py	Wed May 11 08:00:48 2011 -0500
@@ -629,9 +629,11 @@
         r = self._current_response
         while r.headers is None:
             r._select()
-        if r.complete() or r.will_close:
+        if r.will_close:
             self.sock = None
             self._current_response = None
+        elif r.complete():
+            self._current_response = None
         else:
             self._current_response_taken = True
         return r