Skip to content

Commit

Permalink
fix typing of new error callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier committed Jul 3, 2024
1 parent cf27f8c commit 4996b4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asyncua/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, url: str, timeout: float = 4, watchdog_intervall: float = 1.0
self.secure_channel_id = None
self.secure_channel_timeout = 3600000 # 1 hour
self.session_timeout = 3600000 # 1 hour
self.connection_lost_callback: Optional[Callable[[Exception], None]] = None
self.connection_lost_callback: Optional[Callable[[Exception], Coroutine[Any, Any, None]]] = None
self._policy_ids: List[ua.UserTokenPolicy] = []
self.uaclient: UaClient = UaClient(timeout)
self.uaclient.pre_request_hook = self.check_connection
Expand Down Expand Up @@ -561,7 +561,7 @@ async def _monitor_server_loop(self):
await self.uaclient.inform_subscriptions(ua.StatusCode(ua.StatusCodes.BadShutdown))
raise

async def _lost_connection(self, ex: BaseException):
async def _lost_connection(self, ex: Exception):
if not self.connection_lost_callback:
return
try:
Expand Down

0 comments on commit 4996b4f

Please sign in to comment.