-
Notifications
You must be signed in to change notification settings - Fork 368
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
sync.Clinet is not reusable #1364
Comments
This is really common. You cannot restart a Thread object. But the error message is is really hard to understand...we need to improve that.. |
Yes, but the async |
Same is happening to me and I agree with your proposed expected behaviour. |
I'd like to bump this, as we are currently migrating from opcua to opcua-asyncio using the wrapper functions. |
Reopen ThreadLoop if stopped previously analogous to init Fixes FreeOpcUa#1364
Hello everyone, I have submitted a PR #1503, in which a new thread is started analogous to def connect(self) -> None:
if not self.tloop.is_alive():
self.tloop = ThreadLoop()
self.tloop.start()
self.close_tloop = True
self.tloop.post(self.aio_obj.connect()) Analogous for the Server's This now ensures reusability of client and server, allowing a smoother migration, as mentioned by @aclementptw. |
Describe the bug
Calling
connect()
onsync.Client
afterdisconnect()
will raiseThreadLoopNotRunning
error.To Reproduce
Expected behavior
(Re-)initialize
tloop
every time we callconnect()
.Version
The text was updated successfully, but these errors were encountered: