From ba617bb17d2d5f70789d5b357ccca439ef862006 Mon Sep 17 00:00:00 2001 From: gngpp Date: Wed, 30 Sep 2026 23:05:07 +0800 Subject: [PATCH] fix(stream): skip cancellation cleanup after upload EOF --- src/client/body/stream.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/body/stream.rs b/src/client/body/stream.rs index dbdb1c76..3af39cfd 100644 --- a/src/client/body/stream.rs +++ b/src/client/body/stream.rs @@ -332,6 +332,11 @@ impl Stream for PyAsyncStream { let this = self.get_mut(); match this.rx.poll_recv(cx) { Poll::Ready(Some(Some(item))) => Poll::Ready(Some(item)), + Poll::Ready(Some(None)) => { + this.rx.close(); + this.task.take(); + Poll::Ready(None) + } Poll::Ready(_) => { this.rx.close(); Poll::Ready(None)