diff options
author | Devaev Maxim <[email protected]> | 2021-01-23 07:35:34 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2021-01-23 08:11:38 +0300 |
commit | 61f52a36a27b68306fad04224f1964be9ea1d032 (patch) | |
tree | 85151e5afc1eb6a8b03b9babb31630a0c3bd502d /kvmd/apps/vnc/server.py | |
parent | 4d4fb69d2eb2e9b3d677b82098d888bd899c8c33 (diff) |
rename
Diffstat (limited to 'kvmd/apps/vnc/server.py')
-rw-r--r-- | kvmd/apps/vnc/server.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kvmd/apps/vnc/server.py b/kvmd/apps/vnc/server.py index d00360a6..e6bfe3e2 100644 --- a/kvmd/apps/vnc/server.py +++ b/kvmd/apps/vnc/server.py @@ -194,12 +194,12 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes while True: try: streaming = False - async for (online, width, height, jpeg) in streamer.read_stream(): + async for (online, width, height, data) in streamer.read_stream(): if not streaming: logger.info("[%s] %s: Streaming ...", name, self._remote) streaming = True if online: - await self.__send_fb_real(width, height, jpeg) + await self.__send_fb_real(width, height, data) else: await self.__send_fb_stub("No signal") except StreamerError as err: @@ -211,10 +211,10 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes await self.__send_fb_stub("Waiting for stream ...") await asyncio.sleep(1) - async def __send_fb_real(self, width: int, height: int, jpeg: bytes) -> None: + async def __send_fb_real(self, width: int, height: int, data: bytes) -> None: async with self.__lock: if self.__fb_requested: - if (self._width, self._height) != (width, height): + if self._width != width or self._height != height: self.__shared_params.width = width self.__shared_params.height = height if not self._encodings.has_resize: @@ -222,7 +222,7 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes await self.__send_fb_stub(msg, no_lock=True) return await self._send_resize(width, height) - await self._send_fb_jpeg(jpeg) + await self._send_fb_jpeg(data) self.__fb_stub_text = "" self.__fb_stub_quality = 0 self.__fb_requested = False |