Commit f183adef authored by Alan Marchiori's avatar Alan Marchiori
Browse files

added retry logic on socket connection

parent d5e99000
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -147,7 +147,12 @@ def main():
                logging.info('MAKING CONNECTION')
                
                # open socket
                skt = None
                while skt == None:
                    skt = pakbus.open_socket(host, port, timeout)
                    if skt == None:
                        self.log.error("Failed to open socket, retry")
                
                    
                #if (len(pakbus_ids) != len(metric_ids)):
                    #logging.error("'pakbus_ids' and 'metric_ids' need to have the same number of elements")