cleaned up debug messages

This commit is contained in:
Jonas Weinz 2019-03-21 17:08:49 +01:00
parent 181686189c
commit 8dabfec885
2 changed files with 4 additions and 7 deletions

View File

@ -114,7 +114,7 @@ class ConnectionHandler(object):
socket: websockets.WebSocketServerProtocol,
login_msg: str):
msg = parse_message(login_msg)
print(msg)
print("new incomming connection...")
if msg is None:
return None
@ -474,7 +474,7 @@ class ConnectionHandler(object):
async def handle_message(self, conn, msg_str):
msg = parse_message(msg_str)
print(msg)
print("incoming message" + msg)
if msg is None:
return None

View File

@ -29,19 +29,17 @@ DatabaseConnection(db_host,
async def socket_worker(websocket, path):
connection = None
print("new incomin connection")
try:
raw_msg = await websocket.recv()
connection = await ch.new_connection(websocket, raw_msg)
print(ch.open_connections_by_id)
print(ch.open_connections_by_user)
if connection is None:
return
print("successfull logged in user: " + connection.user_name)
async for m in websocket:
await ch.handle_message(connection, m)
@ -59,7 +57,6 @@ async def socket_worker(websocket, path):
id = None
if connection:
id = connection.user_name
print(ch.open_connections_by_id)
await ch.disconnect(connection)
await connection.close()