Skip to content

TCP thread never reports status, so the throughput indicator can never appear #181

Description

@Phlabry

Describe the bug
FromTcpThreadMessage::{Connected, Disconnected, Sent, SendError} are declared (relay/src/message.rs:57-66) and handled (relay/src/update.rs:71-85), but never constructed anywhere. The TCP thread never calls send_to_parent.

Two consequences:

  1. on_tcp_packet_sent is only called from the unreachable Sent arm, so show_metrics stays false forever and the throughput block always early-returns (relay/src/view.rs:92-95). The packet rate indicator added in Add a status indicator to the Relay GUI that shows packet transfer rate over TCP #109 cannot ever display.
  2. state.tcp_connected is only updated by pressing Check TCP Connection Status (relay/src/update.rs:106-109), so the status line shows stale data until manually polled.

Expected behavior
The TCP thread reports connect, disconnect, and send events, so the throughput indicator works and the status line updates on its own.

Additional context
This makes the acceptance criteria of #109 unmet in the shipped code. The whole metrics subsystem (packets_last_60s, bps, sent_packet_times, human_bps) is currently unreachable.

Found while writing the setup documentation in #138 / #178.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions