Small fix to try and address the not sending issue.
This commit is contained in:
parent
d157cf8189
commit
91e7b0ace8
2 changed files with 16 additions and 8 deletions
|
|
@ -80,13 +80,13 @@ def main():
|
|||
print(f"\n{server_message}")
|
||||
print("> ", end="", flush=True)
|
||||
else:
|
||||
# prompt for user input
|
||||
client_message = input()
|
||||
if client_message.strip() == "%!":
|
||||
# Prompt for user input
|
||||
client_message = input("> ").strip()
|
||||
if client_message == "%!":
|
||||
print("Exiting chat...")
|
||||
return
|
||||
|
||||
# send message to server
|
||||
|
||||
# Send message to server
|
||||
client_socket.send(client_message.encode('utf-8'))
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue