From f011dfb23462ab85cf95c9efa3b53653726c6d7a Mon Sep 17 00:00:00 2001 From: asonix Date: Sat, 18 May 2024 12:31:41 -0500 Subject: [PATCH] actix-web-actors: take the internal buffer when yielding --- actix-web-actors/src/ws.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actix-web-actors/src/ws.rs b/actix-web-actors/src/ws.rs index 1fb903225..7f7607fa9 100644 --- a/actix-web-actors/src/ws.rs +++ b/actix-web-actors/src/ws.rs @@ -710,7 +710,7 @@ where } if !this.buf.is_empty() { - Poll::Ready(Some(Ok(this.buf.split().freeze()))) + Poll::Ready(Some(Ok(std::mem::take(&mut this.buf).freeze()))) } else if this.fut.alive() && !this.closed { Poll::Pending } else {