Skip to content

Commit

Permalink
fix: prints msg only when registration success
Browse files Browse the repository at this point in the history
  • Loading branch information
chefZau committed Oct 21, 2021
1 parent 31acebe commit 4de5691
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def acceptWrapper(sock):
# accept connection
conn, addr = sock.accept()

print(f'Accepted connection from client address: {addr}')

conn.setblocking(False)

# retrieves the username from the client
Expand All @@ -67,7 +65,9 @@ def acceptWrapper(sock):
conn.sendall(controlMsg.encode(FORMAT))

if validRegistration:


print(f'Accepted connection from client address: {addr}')

print(
f'Connection to client estatblished, waiting to reveive messages from user "{username}" ... ')

Expand Down

0 comments on commit 4de5691

Please sign in to comment.