diff options
author | Maxim Devaev <[email protected]> | 2023-07-05 11:16:57 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-07-05 11:16:57 +0300 |
commit | 4e9d93b2b1c92542db957eec71161f94f9ccb643 (patch) | |
tree | e9602d8d8d346d9ab21abb43d8d04bd4b1ed6b60 /kvmd/apps | |
parent | a0fba08d4eec9567e3921df9716e6fe9efe05814 (diff) |
pikvm/pikvm#1049: VNC: Fixed memory leak when client doesn't send framebuffer request
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/vnc/server.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kvmd/apps/vnc/server.py b/kvmd/apps/vnc/server.py index f1203519..c7d943d2 100644 --- a/kvmd/apps/vnc/server.py +++ b/kvmd/apps/vnc/server.py @@ -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: |