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
feat(plc4j) Better handling of timeouts in plc4j (#821). #822
Conversation
I think we can config in the driver
And send request like this
|
} else if (evt instanceof CloseConnectionEvent) { | ||
this.protocolBase.close(new DefaultConversationContext<>(ctx, authentication, passive)); | ||
this.protocolBase.close(new DefaultConversationContext<>(this::registerHandler, ctx, authentication, passive)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we should stop TimeManager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, however I am not entirely sure of netty vs plc4x lifecycle. Namely can we reestablish connection once we reached that point? At high level plc4x drivers support connect
call, we would need to assure that it always configure fresh pipeline and uses new timeout manager forcing netty to fire bootstrap procedure again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fresh pipeline finnaly always invoke PlcConnectionManager.getConnection
it will create fesh pipeline. If you don't stop the TimeManager it will caouse memory leak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for initial review, were you able to test this PR against your environment?
What's you changed? |
Signed-off-by: Łukasz Dywicki <luke@code-house.org>
This PR was open for quite long time. I'm going to address @spnettec review comments in separate change set. |
The tricky part I was not able to solve yet is how to wire custom timeout manager into the driver. The configuration instances we have are not well defined and passing them around is not clear to me.