summaryrefslogtreecommitdiff
path: root/python/ovs/stream.py
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-08-23 11:09:46 -0700
committerBen Pfaff <blp@nicira.com>2011-08-24 11:55:49 -0700
commit9601fa824d2c3968fda75204488e347d66d62d1f (patch)
tree723936c76c7b30c2907540bf944d0a5f08feeca8 /python/ovs/stream.py
parent92f8ebf943aab10ad5923516a3d2803a555eed44 (diff)
downloadopenvswitch-9601fa824d2c3968fda75204488e347d66d62d1f.tar.gz
ovs.stream: Fix logic bug in Stream.connect().
The loop here is supposed to run at least once, and to continue looping as long as the loop body changes the current state, but this bug caused it to continue looping until the connection completed in success or failure. It probably didn't cause many problems in practice because only Unix domain socket connections are currently supported, and those connections normally complete immediately. Reported-by: Reid Price <reid@nicira.com>
Diffstat (limited to 'python/ovs/stream.py')
-rw-r--r--python/ovs/stream.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/ovs/stream.py b/python/ovs/stream.py
index 21923798e..c1ce422fa 100644
--- a/python/ovs/stream.py
+++ b/python/ovs/stream.py
@@ -136,6 +136,7 @@ class Stream(object):
returns errno.EAGAIN."""
last_state = -1 # Always differs from initial self.state
while self.state != last_state:
+ last_state = self.state
if self.state == Stream.__S_CONNECTING:
self.__scs_connecting()
elif self.state == Stream.__S_CONNECTED: