tcpServer: Don't print intermittent newlines

This commit is contained in:
Nick Renieris 2022-06-22 20:11:01 +03:00 committed by GRAnimated
parent 063e20677f
commit 5c71569545
1 changed files with 2 additions and 2 deletions

View File

@ -23,11 +23,11 @@ while True:
while True:
data = connection.recv(1024)
if data:
print(data.decode("utf-8"))
print(data.decode("utf-8"), end='', flush=True)
else:
print(f'Connection Terminated.')
break
finally:
# Clean up the connection
connection.close()