Skip to content

Commit

Permalink
Remove socket clients with error
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioburdisso committed Jul 27, 2020
1 parent 6cd017c commit d9670ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyss3/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,9 @@ def serve(
try:
read_socks, write_socks, error_socks = select(clients, [], [])

for sock in error_socks:
clients.remove(sock)

for sock in read_socks:
if sock is server_socket:
sockfd, addr = server_socket.accept()
Expand Down

0 comments on commit d9670ea

Please sign in to comment.