From 5926f75ef42c33b5c08401617b8d90ffc6c4ab06 Mon Sep 17 00:00:00 2001 From: Yin Jifeng Date: Wed, 15 Mar 2023 13:45:06 +0800 Subject: [PATCH] fix: reset Reader::SeekState when poll completed --- src/types/reader.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/reader.rs b/src/types/reader.rs index c21ad2846f7..63c306659c0 100644 --- a/src/types/reader.rs +++ b/src/types/reader.rs @@ -152,6 +152,7 @@ impl tokio::io::AsyncSeek for Reader { } SeekState::Start(pos) => { let n = ready!(self.inner.poll_seek(cx, pos))?; + self.get_mut().seek_state = SeekState::Init; Poll::Ready(Ok(n)) } }