1
0
mirror of https://github.com/TheGreyDiamond/Enlight.git synced 2025-12-16 23:10:45 +01:00

Update session.py

This commit is contained in:
TheGreyDiamond
2020-09-14 18:50:10 +02:00
parent daee0b7673
commit fe14651325

View File

@@ -99,6 +99,7 @@ class enlightSession():
self.__client__ = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)#, socket.IPPROTO_UDP) # UDP
self.__client__.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
self.__client__.bind((self.__my_ip__, 37020))
logging.info("Starting lighthouse thread")
self.__activ__ = True
self.__direct_socket__ = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -172,6 +173,7 @@ class enlightSession():
while self.allowJoin:
self.__server__.sendto(message, ("192.168.178.60", 37020)) # <broadcast> 192.168.178.60 255.255.255.255
logging.info("Sent discovery broadcast")
time.sleep(1)
logging.info("Discovery server stopped")