accept incoming connections even if ignoring them
If the connection isn't accepted then the listener socket will continue being
returned by select.
diff --git a/src/python/oftest/controller.py b/src/python/oftest/controller.py
index cf4cf69..cc8b97c 100644
--- a/src/python/oftest/controller.py
+++ b/src/python/oftest/controller.py
@@ -286,6 +286,8 @@
if s and s == self.listen_socket:
if self.switch_socket:
self.logger.warning("Ignoring incoming connection; already connected to switch")
+ (sock, addr) = self.listen_socket.accept()
+ sock.close()
return 0
(sock, addr) = self.listen_socket.accept()