commit | a006fbccaa339c89ae165c4e1a5f6230e3bbbc75 | [log] [tgz] |
---|---|---|
author | Rich Lane <rlane@bigswitch.com> | Fri May 22 13:07:11 2015 -0700 |
committer | Rich Lane <rlane@bigswitch.com> | Fri May 22 13:07:11 2015 -0700 |
tree | 09e5b40923f99a959de66ad9497ab0e5fb255c5b | |
parent | 32b7e7334b9f85fe974d9050e1c9bb39f4f4b3d3 [diff] |
pyloxi: wait for HELLO when connecting
diff --git a/py_gen/templates/connection.py b/py_gen/templates/connection.py index dd74855..f0648be 100644 --- a/py_gen/templates/connection.py +++ b/py_gen/templates/connection.py
@@ -256,5 +256,9 @@ cxn.daemon = daemon cxn.logger.debug("Connected to %s:%d", ip, port) cxn.start() + cxn.send(ofp.message.hello()) + if not cxn.recv(lambda msg: msg.type == ofp.OFPT_HELLO): + raise Exception("Did not receive HELLO") + return cxn