Added initial windows support

This commit is contained in:
Christoph Stahl 2024-10-01 12:32:11 +02:00
parent bbbf54c9ed
commit 9a2cfac637

View file

@ -13,6 +13,7 @@ be one of:
"""
from __future__ import annotations
import os
import asyncio
import datetime
from logging import LogRecord
@ -443,6 +444,8 @@ async def start_client(config: dict[str, Any]) -> None:
await sio.connect(state.config["server"])
# this is not supported under windows
if os.name != "nt":
asyncio.get_event_loop().add_signal_handler(signal.SIGINT, signal_handler)
asyncio.get_event_loop().add_signal_handler(signal.SIGTERM, signal_handler)