debugging

This commit is contained in:
2022-05-31 11:44:08 +02:00
parent c3012cd7a4
commit a1cbc3bc13
2 changed files with 15 additions and 27 deletions

View File

@ -15,7 +15,6 @@ LOGGER = get_console_logger()
class TmTcpServer:
_Instance = None
def __init__(self):
@ -41,17 +40,18 @@ class TmTcpServer:
def close(self):
self.server_socket.close()
if self.client_connection != None:
if self.client_connection is not None:
self.client_connection.close()
def getInstance():
if TmTcpServer._Instance == None:
@staticmethod
def get_instance():
if TmTcpServer._Instance is None:
TmTcpServer._Instance = TmTcpServer()
return TmTcpServer._Instance
def _send_dictionary_over_socket(self, dictionary):
# keep listeners current
if self.client_connection == None:
if self.client_connection is None:
# no running connection, see if a client wants to connect
try:
(self.client_connection, _) = self.server_socket.accept()