2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

ovs.stream: Simplify logic in Stream.wait().

Suggested-by: Reid Price <reid@nicira.com>
This commit is contained in:
Ben Pfaff
2011-08-23 11:16:57 -07:00
parent 63b1a52133
commit 8ba31bf16d

View File

@@ -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)