projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63b1a52
)
ovs.stream: Simplify logic in Stream.wait().
author
Ben Pfaff
<blp@nicira.com>
Tue, 23 Aug 2011 18:16:57 +0000
(11:16 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Wed, 24 Aug 2011 19:06:53 +0000
(12:06 -0700)
Suggested-by: Reid Price <reid@nicira.com>
python/ovs/stream.py
patch
|
blob
|
history
diff --git
a/python/ovs/stream.py
b/python/ovs/stream.py
index 5954c3148a76768e02483b71d49b553e1dd70db3..82d4557e953035636311ca14c0d777c9ae5684f2 100644
(file)
--- a/
python/ovs/stream.py
+++ b/
python/ovs/stream.py
@@
-206,10
+206,10
@@
class Stream(object):
if self.state == Stream.__S_CONNECTING:
wait = Stream.W_CONNECT
- if wait in (Stream.W_CONNECT, Stream.W_SEND):
- poller.fd_wait(self.socket, select.POLLOUT)
- else:
+ if wait == Stream.W_RECV:
poller.fd_wait(self.socket, select.POLLIN)
+ else:
+ poller.fd_wait(self.socket, select.POLLOUT)
def connect_wait(self, poller):
self.wait(poller, Stream.W_CONNECT)