From 65beb2d84eb39b9e002c235350722f24a3b1331a Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 14 Sep 2018 16:34:13 -0400 Subject: [PATCH] Top level actor must have a `main()` now --- tractor/_actor.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tractor/_actor.py b/tractor/_actor.py index 1962229..c9daa81 100644 --- a/tractor/_actor.py +++ b/tractor/_actor.py @@ -705,11 +705,9 @@ async def _start_actor( arbiter_addr=arbiter_addr, ) ) - if main is not None: - result = await main() + result = await main() - # XXX: If spawned with a dedicated "main function", - # the actor is cancelled when this context is complete + # XXX: the actor is cancelled when this context is complete # given that there are no more active peer channels connected actor.cancel_server()