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