From caa80ac181303850ee88d6ffd653f5acb34122de Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 14 Apr 2022 23:07:14 +0800 Subject: fix stream --- xmake/modules/private/service/stream.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/xmake/modules/private/service/stream.lua b/xmake/modules/private/service/stream.lua index c2709189a..408b67dc3 100644 --- a/xmake/modules/private/service/stream.lua +++ b/xmake/modules/private/service/stream.lua @@ -132,6 +132,7 @@ function stream:recv(buff, size) local cache_maxn = cache:size() if size <= cache_size then buff:copy(cache, 1, size) + cache:move(size + 1, cache_size) cache_size = cache_size - size self._RCACHE_SIZE = cache_size return buff:slice(1, size) -- cgit v1.3.1