From 69549de215c73c72bdb0b2e2176946223f38591a Mon Sep 17 00:00:00 2001 From: oroulet Date: Sat, 24 Oct 2020 17:48:17 +0200 Subject: [PATCH] make example client renew connectin every two seconds for debugging --- examples/client_to_prosys_crypto.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/client_to_prosys_crypto.py b/examples/client_to_prosys_crypto.py index 6da1afdf0..cd6407212 100644 --- a/examples/client_to_prosys_crypto.py +++ b/examples/client_to_prosys_crypto.py @@ -9,11 +9,13 @@ async def main(): client = Client("opc.tcp://localhost:53530/OPCUA/SimulationServer/") client.set_security_string("Basic256Sha256,Sign,certificate-example.der,private-key-example.pem") + client.session_timeout = 2000 async with client: root = client.nodes.root objects = client.nodes.objects - print("childs og objects are: ", await objects.get_children()) - await asyncio.sleep(3) + while True: + print("childs og objects are: ", await objects.get_children()) + await asyncio.sleep(1)