You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I tried "client_reconnect",when I shutdown the server after opc connected, loop did not stop, there is no exception throw
try:
async with client:
_logger.warning("Connected")
subscription = await client.create_subscription(500, handler)
node = (client.get_node(ua.ObjectIds.Server_ServerStatus_CurrentTime),)
await subscription.subscribe_data_change(node)
while True:
await asyncio.sleep(1)
await client.check_connection() # Throws a exception if connection is lost
except (ConnectionError, ua.UaError):
_logger.warning("Reconnecting in 2 seconds")
await asyncio.sleep(2)
Beta Was this translation helpful? Give feedback.
All reactions