Created
January 23, 2020 10:34
-
-
Save BMU-Verlag/9afe4ab634b4020564c7ba0f818030e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
message = receive(socket) | |
if not message: | |
print(f'{client_socket.getpeername()[0]}:{client_socket. getpeername()[1]} closed the connection') | |
all_sockets.remove(socket) | |
continue | |
broadcast(socket, message) | |
except ConnectionResetError as e: | |
all_sockets.remove(socket) | |
print('Client forcefully closed the connection') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment