Commit 1ed40155 authored by Alan Marchiori's avatar Alan Marchiori

increased poll interval and reopen socket every time we collect data

parent ac18a969
......@@ -32,7 +32,7 @@ router_node = 0x001 # need to implement for DstPhyAddr = 0x001
addition_size = 100
database_update_time_gap = 300
database_update_time_gap = 30
connection_retry_interval = 25
......
......@@ -187,8 +187,14 @@ def main():
#logging.warn("all done, exiting")
#exit();
#shutdown connection
skt.shutdown(socket.SHUT_RDWR)
skt.close()
time.sleep(database_update_time_gap)
# reopen socket
skt = pakbus.open_socket(host, port, timeout)
except socket.error as msg:
logging.error("Socket died with: {}".format(msg))
skt.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment