From 124b3bdde1e198ea2d1fdfb17e5383c6e96a9afc Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 13 Oct 2016 22:55:43 -0500 Subject: [PATCH] Catch server discovery error --- resources/lib/connect/connectionmanager.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/lib/connect/connectionmanager.py b/resources/lib/connect/connectionmanager.py index cd9d6026..60dc2fed 100644 --- a/resources/lib/connect/connectionmanager.py +++ b/resources/lib/connect/connectionmanager.py @@ -263,9 +263,15 @@ class ConnectionManager(object): log.debug("MultiGroup : %s" % str(MULTI_GROUP)) log.debug("Sending UDP Data: %s" % MESSAGE) - sock.sendto(MESSAGE, MULTI_GROUP) - + servers = [] + + try: + sock.sendto(MESSAGE, MULTI_GROUP) + except Exception as error: + log.error(error) + return servers + while True: try: data, addr = sock.recvfrom(1024) # buffer size