Fix issue-602, completely kills the tasks associated with the S7 driver. #771
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
The original design of the S7 driver delegates the closing of the created tasks to the GC, which does not guarantee that they are closed deterministically.
In practice, it is always advisable to call the closure of tasks in a planned way and not delegate it to the GC.
The "RequestTransactionManager" is modified, to which a public "shutdown" method is added to end the group of associated tasks in a scheduled manner.
"S7ProtocolLogic" is changed so that during the "onDisconnect" process, all tasks associated with the driver are called to end.
The task groups are identified in such a way to facilitate their diagnosis with the profiler.
Added some additional fields that will be required for the high availability ("HA") version of the driver.
Multiple tests are carried out, and it always ends correctly without leaving ghost tasks.
Best regards,