Skip to content

fix: master tcp reconnection issue - #173

Draft
alisitsyn wants to merge 2 commits into
mainfrom
bugfix/fix_master_tcp_reconnection_issue
Draft

fix: master tcp reconnection issue#173
alisitsyn wants to merge 2 commits into
mainfrom
bugfix/fix_master_tcp_reconnection_issue

Conversation

@alisitsyn

@alisitsyn alisitsyn commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes the issue of Modbus TCP Master to reestablish connection with the slave node as soon as possible. Current TCP Master supposed that all slaves should be available on starting connection phase and did not repair connection when connection error exists.

The above issue has been reproduced and confirmed as bug with IP101 Ethernet board. The port_tcp_master.c has been updated to repair connection cycle as soon as possible if the errors exist.

Related

Fixes EPROT-62 - #167

Testing

  • The above issue has been reproduced and confirmed as bug. The port_tcp_master.c has been updated to repair connection cycle as soon as possible if the errors exist.
  • Two scenarios have been checked during testing:
  • TCP Slaves are not available during one minute after start then connected to the network.
  • TCP Slaves are connected on start but become disconnected during more than 1 minute, then become alive again.
    In the above cases the TCP Master was able to establish connections as soon as possible and proceed with polling cycle correctly.

Checklist

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@alisitsyn
alisitsyn force-pushed the bugfix/fix_master_tcp_reconnection_issue branch from 4e74762 to 84c1f8d Compare May 21, 2026 07:44
@alisitsyn
alisitsyn marked this pull request as draft May 21, 2026 07:46
@alisitsyn alisitsyn self-assigned this May 21, 2026
@alisitsyn alisitsyn added this to the v2.1.3 milestone May 21, 2026
@alisitsyn alisitsyn changed the title Bugfix/fix master tcp reconnection issue fix: master tcp reconnection issue May 21, 2026
@alisitsyn
alisitsyn force-pushed the bugfix/fix_master_tcp_reconnection_issue branch from 68891d5 to dd25e20 Compare May 21, 2026 10:08
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