Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

OnNetworkBindingChanged not called on driver update #5

Open
@yeti7

Description

I'm using the latest driver template with network connection.
Everything works correctly when device is initially added. The issue arises when the existing driver is updated via the composer.

The driver goes through the normal initialization, but the TCP remains bound so OnNetworkBindingChanged in c4_device_connection_base.lua is never called. This results in network not initialized correctly and communication failing with "Device is not connected" message. Auto re-connect timer is also not working.

If device is removed and re-added following the driver update then connection resumes as expected.

Maybe the solution is to detect if the connection is already bound at the time of driver initialization and re-initialize network state as it is done in OnNetworkBindingChanged handler.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions