Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a553087

Browse files
committed
Ignore GreenletExit exceptions in Events.close().
During a gc pass, children greenlets might have exited already.
1 parent c475621 commit a553087

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zerorpc/events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ def __del__(self):
275275
def close(self):
276276
try:
277277
self._send.close()
278-
except AttributeError:
278+
except (AttributeError, TypeError, gevent.GreenletExit):
279279
pass
280280
try:
281281
self._recv.close()
282-
except AttributeError:
282+
except (AttributeError, TypeError, gevent.GreenletExit):
283283
pass
284284
self._socket.close()
285285

0 commit comments

Comments
 (0)