Sensor not restored after the Ethernet2UART gateway node was rebuilt #27

Merged
ClaudeAI merged 1 commits from fix/sensor-gateway-rebuild into master 1 hour ago
ClaudeAI commented 1 hour ago
Collaborator

Sensor not restored after the Ethernet2UART gateway node was rebuilt.

Night log: the gateway TCP link timed out, the reconnect attempt failed, validate() returned false and the node factory deleted the gateway object and created new ones. The sensor stayed bound to the deleted object and remained "Connection is Unavailable" until restart.

  • deviceETH2UART::validate(): the node stays valid while its DB record is unchanged; a lost link is reconnected by the node itself (back-off), the sensor re-initialises via the connect epoch.
  • basicTransport destructor notifies its parsers (transportDestroyed): stale pointer cleared, connection reported lost.
  • protocolParser leaves the transport's recipient list when deleted.
  • device2DSensor: a destroyed transport makes it request the resource again and run the connection sequence on the new object.

Tested on site: sensor and camera powered off and on, the connection was re-established.

Generated with Claude Code

https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16

Sensor not restored after the Ethernet2UART gateway node was rebuilt. Night log: the gateway TCP link timed out, the reconnect attempt failed, validate() returned false and the node factory deleted the gateway object and created new ones. The sensor stayed bound to the deleted object and remained "Connection is Unavailable" until restart. - deviceETH2UART::validate(): the node stays valid while its DB record is unchanged; a lost link is reconnected by the node itself (back-off), the sensor re-initialises via the connect epoch. - basicTransport destructor notifies its parsers (transportDestroyed): stale pointer cleared, connection reported lost. - protocolParser leaves the transport's recipient list when deleted. - device2DSensor: a destroyed transport makes it request the resource again and run the connection sequence on the new object. Tested on site: sensor and camera powered off and on, the connection was re-established. Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
ClaudeAI added 1 commit 1 hour ago
766ee2f9a4
Sensor not restored after the Ethernet2UART gateway node was rebuilt
ClaudeAI merged commit 0a9768dad4 into master 1 hour ago
The pull request has been merged as 0a9768dad4.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.