diff --git a/src/openjd/adaptor_runtime_client/win_client_interface.py b/src/openjd/adaptor_runtime_client/win_client_interface.py index 16c761a..eb129c5 100644 --- a/src/openjd/adaptor_runtime_client/win_client_interface.py +++ b/src/openjd/adaptor_runtime_client/win_client_interface.py @@ -5,7 +5,6 @@ from .base_client_interface import Response as _Response import http.client import signal as _signal -import threading as _threading from .base_client_interface import BaseClientInterface @@ -26,8 +25,10 @@ def __init__(self, server_path: str) -> None: server_path (str): Used as pipe name in Named Pipe Server. """ super().__init__(server_path) - if _threading.current_thread() is _threading.main_thread(): + try: _signal.signal(_signal.SIGBREAK, self.graceful_shutdown) # type: ignore[attr-defined] + except ValueError: + pass def _send_request( self,