Rev 6173: Treat an 'errfds' as just something we want to try and read from later. in http://bazaar.launchpad.net/~jameinel/bzr/drop-idle-connections-824797

John Arbash Meinel john at arbash-meinel.com
Mon Sep 19 10:52:37 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/drop-idle-connections-824797

------------------------------------------------------------
revno: 6173
revision-id: john at arbash-meinel.com-20110919105225-cn62n2zi3aj5efdm
parent: john at arbash-meinel.com-20110916134853-e2jhw7td49nqpjmz
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: drop-idle-connections-824797
timestamp: Mon 2011-09-19 12:52:25 +0200
message:
  Treat an 'errfds' as just something we want to try and read from later.
  
  It means something is 'wrong', but as we don't know what, we just need to
  try to read on the socket and see what fails.
-------------- next part --------------
=== modified file 'bzrlib/smart/medium.py'
--- a/bzrlib/smart/medium.py	2011-09-16 13:48:53 +0000
+++ b/bzrlib/smart/medium.py	2011-09-19 10:52:25 +0000
@@ -310,13 +310,9 @@
                 # socket, just return 'without timeout'
                 return False
             raise
-        if xs:
-            # I honestly don't know what to do here. Something is wrong with
-            # the file handle, but we don't know *what*.
-            raise errors.BzrError('select returned an error for fd: %s'
-                                  % (xs[0],))
-        if rs:
-            # We can read without blocking, we did not timeout.
+        if rs or xs:
+            # Either we can read without blocking, or there is a pending error.
+            # Either way, we didn't time out, so try to read from it.
             return False
         return True
 



More information about the bazaar-commits mailing list