-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uaerr #1669
Conversation
pass | ||
|
||
|
||
class UaClientConnectionLostError(UaError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe have this also inherit ConnectionError for any existing code out there that excepts that?
@@ -531,13 +532,22 @@ async def check_connection(self) -> None: | |||
# if not it throws the underlying exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes this comment wrong
if self._renew_channel_task is not None: | ||
if self._renew_channel_task.done(): | ||
await self._renew_channel_task | ||
try: | ||
await self._renew_channel_task | ||
except Exception as ex: | ||
raise UaClientRenewChannelError() from ex | ||
if self._monitor_server_task is not None: | ||
if self._monitor_server_task.done(): | ||
await self._monitor_server_task | ||
try: | ||
await self._monitor_server_task | ||
except Exception as ex: | ||
raise UaClientConnectionLostError() from ex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change the order of these two blocks. If the monitor task determines that the connection is lost, any errors in the renew channel task is most likely due to the lost connection?
No description provided.