From f90ca0668b6e5d1aef2f49e18c0f9e0188996f16 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 8 Mar 2024 13:48:35 -0500 Subject: [PATCH] Woops, fix one last `ctx._cancelled_caught` in drain loop --- tractor/_context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tractor/_context.py b/tractor/_context.py index 9179456b..ee058196 100644 --- a/tractor/_context.py +++ b/tractor/_context.py @@ -196,8 +196,8 @@ async def _drain_to_final_msg( (ctx._stream.closed and (reason := 'stream was already closed') ) - or (ctx._cancelled_caught - and (reason := 'ctx caught a cancel') + or (ctx.cancel_acked + and (reason := 'ctx cancelled other side') ) or (ctx._cancel_called and (reason := 'ctx called `.cancel()`')