Skip to content

Commit

Permalink
✨ except ConnectionResetError
Browse files Browse the repository at this point in the history
  • Loading branch information
userElaina committed Dec 21, 2024
1 parent 5b36a1f commit c377e0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/inincompatibility/iserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ def run_client_once(self):
print('Closed by', client_addr)
return self.client_close_callback(client_addr)
while True:
data = client_socket.recv(self.buffer_size)
try:
data = client_socket.recv(self.buffer_size)
except ConnectionResetError:
break
if not data:
break
res = self._eval_from_data(data)
Expand Down

0 comments on commit c377e0f

Please sign in to comment.