Skip to content

Commit

Permalink
Break out of the loop immediately when closed
Browse files Browse the repository at this point in the history
  • Loading branch information
coldfix committed Jan 24, 2019
1 parent 376e154 commit e517e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpyc/core/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def serve_all(self):
"""Serves all requests and replies for as long as the connection is
alive."""
try:
while True:
while not self.closed:
self.serve(None)
except (socket.error, select_error, IOError):
if not self.closed:
Expand Down

0 comments on commit e517e51

Please sign in to comment.