Skip to content
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

Connection status listener for NettyTcpClientTransport #78

Merged
merged 6 commits into from
Nov 13, 2024

Conversation

kevinherron
Copy link
Contributor

Adds the ability to register a ConnectionListener with NettyTcpClientTransport that is notified when the connection is established or lost.

@kevinherron kevinherron mentioned this pull request Sep 26, 2024
@kevinherron kevinherron requested a review from Copilot November 13, 2024 15:01

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

modbus-tcp/src/main/java/com/digitalpetri/modbus/client/NettyTcpClientTransport.java:73

  • Ensure that the behavior introduced by maybeNotifyConnectionListeners, specifically the conditions for notifying connection listeners, is covered by tests.
private void maybeNotifyConnectionListeners(State from, State to) {
@kevinherron kevinherron force-pushed the tcp-connection-listener branch from 58193fb to 7bfe348 Compare November 13, 2024 15:20
@kevinherron kevinherron requested a review from Copilot November 13, 2024 15:20

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

modbus-tests/src/test/java/com/digitalpetri/modbus/test/ModbusTcpClientServerIT.java:139

  • Ensure the client is connected before calling client.disconnect() to avoid potential race conditions.
client.disconnect();
@kevinherron kevinherron merged commit ef9d319 into master Nov 13, 2024
1 check passed
@kevinherron kevinherron deleted the tcp-connection-listener branch December 24, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant