Skip to content

Commit 3a313f9

Browse files
committed
fix(aiohttp): use AppKey for state
1 parent b48f83a commit 3a313f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/src/wslink/backends/aiohttp/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
if HTTP_HEADERS and Path(HTTP_HEADERS).exists():
2424
HTTP_HEADERS: dict = json.loads(Path(HTTP_HEADERS).read_text())
2525

26+
STATE_KEY = aiohttp_web.AppKey("state", str)
27+
2628
logger = logging.getLogger(__name__)
2729

2830
# -----------------------------------------------------------------------------
@@ -92,7 +94,7 @@ def __init__(self, server_config):
9294
self.app.router.add_route("GET", "/", _root_handler)
9395
self.app.add_routes(routes)
9496

95-
self.app["state"] = {}
97+
self.app[STATE_KEY] = {}
9698

9799
# -------------------------------------------------------------------------
98100
# Server status

0 commit comments

Comments
 (0)