Skip to content

Connect TCP with an invalid address is silent in the event log #241

Open

Description

@PRINCEKK122

Describe the bug

Pressing Connect TCP with an empty or malformed address does nothing visible in the event log. No connection is attempted and no entry is recorded, so the GUI looks like it ignored the press.

connect_tcp_with_validation_and_save (relay/src/update.rs:13) validates first. On failure it sets tcp_addr_validation_error and returns without calling tcp_connect, so none of the paths that normally report a connection problem are reached. The only feedback is one line of plain text rendered by tcp_validation_text (relay/src/view.rs:192), between the address box and the buttons, which is easy to miss.

The event log panel added in #183 exists so connection failures are visible. This is the one connection failure that never reaches it.

To Reproduce

  1. Start the relay.
  2. Leave the address box untouched. The greyed 127.0.0.1:9999 is placeholder text, not a value, so the field is empty.
  3. Press Connect TCP.
  4. Nothing appears in Recent events. The mock server never reports a connection. Pressing Check TCP Connection Status does nothing, because there is no connection to check.

Expected behavior

A rejected address is recorded in the event log like every other connection failure, and the message distinguishes an empty field from a malformed one.

Additional context

The empty-field case is the one that costs time, because validate_tcp_addr (relay/src/state.rs:345) returns the same "Invalid IP address" text for an empty string as for a typo, which reads as though something was typed wrong rather than not typed at all.

Hit while testing #234: roughly half an hour went to diagnosing a relay that appeared not to connect, with nothing in the log to work from.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions