Only call `.poll()` if a method on the spawn backend

signint_saviour
Tyler Goodlet 2022-07-11 09:42:00 -04:00
parent 64909e676e
commit 4dcc21234e
1 changed files with 3 additions and 5 deletions

View File

@ -655,14 +655,12 @@ class Actor:
entry = local_nursery._children.get(uid)
if entry:
_, proc, _ = entry
# if proc.poll() is not None:
# log.error('Actor {uid} proc died and IPC broke?')
if proc.poll() is None:
poll = getattr(proc, 'poll', None)
if poll and poll() is None:
log.cancel(
f'Actor {uid} IPC terminated but proc is alive?!'
f'Actor {uid} IPC broke but proc is alive?'
)
# f'Actor {uid}@{proc} IPC connection broke!?'
# ``Channel`` teardown and closure sequence