From c66f1d119f74c440a8db6e42b5cf02e3595fcb10 Mon Sep 17 00:00:00 2001 From: Pablo Iglesias Date: Wed, 10 Apr 2024 10:01:55 +0200 Subject: [PATCH] =?UTF-8?q?Added=20fix=20for=20asus=20rog=20ally=20on=20wi?= =?UTF-8?q?ndows=20to=20prevent=20an=20error=20related=20wi=E2=80=A6=20(#1?= =?UTF-8?q?14)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added fix for asus rog ally on windows to prevent an error related with websockets connection * refactor code to use PLATFORM_WIN --- css_browserhook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css_browserhook.py b/css_browserhook.py index c945536..eb4615d 100644 --- a/css_browserhook.py +++ b/css_browserhook.py @@ -1,6 +1,6 @@ import os, re, uuid, asyncio, json, aiohttp, time from typing import List -from css_utils import get_theme_path, Log, Result +from css_utils import get_theme_path, Log, Result, PLATFORM_WIN import css_inject MAX_QUEUE_SIZE = 500 @@ -414,7 +414,7 @@ async def health_check(self): while True: await asyncio.sleep(3) try: - async with aiohttp.ClientSession() as web: + async with aiohttp.ClientSession(trust_env=PLATFORM_WIN) as web: res = await web.get(f"http://127.0.0.1:8080/json/version", timeout=3) if (res.status != 200):