Skip to content

taptap tcp connection issue? #14

@litinoveweedle

Description

@litinoveweedle

Hello,

as you probably know I do provide Python mqtt wrapper and package your taptap as Home Assistant addon.

I am using Python subprocess.popen to read from the taptap stdout and stderr. Time to time I observe strange behavior where no new messages are produced by taptap after some time. The process is still running but not logging anything. If I restart taptap it will immediately starts login new messages. TCP connection is listed as in state ESTABLISHED, but there are no data flowing between taptap and the Modbus converter (validated by tcpdump).

The issue can be as well caused by sketchy Modbus convertor implementation. (i.e. improper Modbus TCP session handling etc.), but it would be nice if taptap can detect such state.

I also checked your code, especially the function observe in the main.rs and I am not sure, if your code handle correctly all edge cases - for example TCP session timeout/reset/connection loss to the converter. To my use case it will be sufficient to implement taptap to exit with error code, so no reconnect logic is necessary. I tested this theory by restarting Modbus converter, but taptap process not detecting that - connection is still listed as ESTABLISHED and no data are flowing.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions