Skip to content

Relay starts in a permanently broken IPC state when baton.sock is already in use #180

Description

@Phlabry

Describe the bug
If baton.sock is occupied, by a second relay instance or a stale socket, the IPC listener thread logs once and returns Ok(()) (relay/src/state.rs:373-380). It reports success while having done nothing. ipc_connect then sets ipc_thread_handle to Some regardless (relay/src/state.rs:495-497), so the guard at relay/src/state.rs:355-357 rejects every later Connect IPC press.

Because ipc_connect runs at startup (relay/src/main.rs:37-41), the relay boots straight into this state.

To Reproduce

  1. Start one relay instance.
  2. Start a second one.
  3. The second shows :( No Baton Connection forever.
  4. Press Connect IPC. Nothing happens and no error is shown.

Expected behavior
The socket conflict is surfaced in the GUI, and the thread does not report success when it failed to start.

Additional context
The only visible symptom is :( No Baton Connection, which is indistinguishable from the plugin simply not running. Disconnect IPC clears the handle and is the undocumented recovery. The message goes to stderr only.

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