-
Notifications
You must be signed in to change notification settings - Fork 232
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
libplctag never stops after disconnect / reconnect (AB CLX) #450
Comments
Interesting. Thanks for the report. The third thread appears to be the thread for the PLC connection. It should have been set to terminate, but it looks like the timing/coordination is not working right. This might take me some time to debug. I am going to mark this as a bug for now. Thanks again! |
I just added an ab_session_terminating flag which will be set in session_teardown and ends all remaining THREAD_FUNCs with additionally destroying the session. Now plctag_shutdown never hangs... |
I am just getting back to you, sorry for the delay! I am not sure why adding an additional flag would make this work. The existing I have not been able to reproduce this. Are the steps here:
Is that correct? |
I found some places in the main API where the tag was not getting released and I think that contributed to this as the destructor for the session object was not getting called. I think this is fixed with version 2.6.2. Please check your use case and reopen this if it is still not working. Thanks again for the bug report! |
* Make file number optional if input or output file. Fix #481. * Added fix for omitted data file number on I or O files. Added support for a numeric subelement. Fix #479. (#483) * Fix #486. (#487). String size change problem. Fixed with #488. * Added atomic flag and checks to aid in making all sessions terminate when the library is shutting down. Fix #450. * plc_tag_set_string() feature additions (#488). Setting string can change tag data buffer size. And added flag, allow_field_resize, to suppress change. * Added msp response size check before adding new requests to msp with allow_packing=1 and fragmented reads disabled (#489) * Support for Omron to use multi-request packets. --------- Co-authored-by: Phil Smith <105802449+ptsOSL@users.noreply.github.com>
If i interrupt my connection to the plc (disconnect / reconnect) libplctag never returns from plc_tag_shutdown
Attached two logs, first without interruption, second with interruption:
plc_tag_shutdown when connection was not interrupted:
plc_tag_shutdown when connection was interrupted / disconnected and reconnected:
Now there is a thread(3) ...
The text was updated successfully, but these errors were encountered: