summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-10-11 16:58:34 +0000
committerRafael H. Schloming <rhs@apache.org>2009-10-11 16:58:34 +0000
commit4327fe8fe5d0dfd1a12d143a225a7839a35553ae (patch)
tree64403805a44e1d30a7df1e65ce0fc8f220c5ffff /qpid/python
parent38ddddd69f70fff0edebfdab64418f4a55155bb2 (diff)
downloadqpid-python-4327fe8fe5d0dfd1a12d143a225a7839a35553ae.tar.gz
only invoke readable and writeable if the selectables are still reading and writing
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@824107 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/selector.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/qpid/python/qpid/selector.py b/qpid/python/qpid/selector.py
index 710f8f0689..46052e1108 100644
--- a/qpid/python/qpid/selector.py
+++ b/qpid/python/qpid/selector.py
@@ -136,10 +136,12 @@ class Selector:
rd, wr, ex = select(self.reading, self.writing, (), timeout)
for sel in wr:
- sel.writeable()
+ if sel.writing():
+ sel.writeable()
for sel in rd:
- sel.readable()
+ if sel.reading():
+ sel.readable()
now = time.time()
for sel in self.selectables.copy():