From c865d01e85800dca9acfecfff9ec5dbfaab3b6a0 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 11 Jul 2022 09:42:00 -0400 Subject: [PATCH] Only call `.poll()` if a method on the spawn backend --- tractor/_actor.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tractor/_actor.py b/tractor/_actor.py index dbdab85..0c6c83e 100644 --- a/tractor/_actor.py +++ b/tractor/_actor.py @@ -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