mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
pikvm/pikvm#1049: VNC: Fixed memory leak when client doesn't send framebuffer request
This commit is contained in:
parent
a0fba08d4e
commit
4e9d93b2b1
@ -238,6 +238,8 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes
|
||||
async def __queue_frame(self, frame: (dict | str)) -> None:
|
||||
if isinstance(frame, str):
|
||||
frame = await self.__make_text_frame(frame)
|
||||
if self.__fb_queue.qsize() > 10:
|
||||
self.__fb_queue.get_nowait()
|
||||
self.__fb_queue.put_nowait(frame)
|
||||
|
||||
async def __make_text_frame(self, text: str) -> dict:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user