Open eskildsf opened 8 months ago
Is it safe? not correctly closing things is often a very bad ideas. But maybe in that particular case it is worth it... not sure
Hi @oroulet
I don't think I can say "yes" confidently. You probably have a better basis to make that call.
I will say though that it is quite useful for the Python session not to hang if you have an exception which causes a crash. That is probably the most relevant usecase since I do agree that in the best of all worlds the programmer would make the call to disconnect
deliberately.
Br Eskild
Configuring a sync Client object and connecting it to an OPC-UA host will cause the calling script to hang on exit if disconnect() is not called. By setting the ThreadLoop to be a daemon resolves this issue.