Skip to content

fix(server): broken shutdown_tx in run_server after #1704 merged onto post-#1945 main #2026

Description

@st-gr

Symptom

cargo build / cargo check -p openshell-server fails on current main (commit 4ee27d99) with:

```
error[E0425]: cannot find value shutdown_tx in this scope
--> crates/openshell-server/src/lib.rs:460:13
|
460 | let _ = shutdown_tx.send(true);
| ^^^^^^^^^^^ help: a local variable with a similar name exists: _shutdown_tx
```

rust-toolchain.toml pins 1.95.0; reproduces under any clean checkout of main.

Cause

crates/openshell-server/src/lib.rs::run_server declares (_shutdown_tx, shutdown_rx) at line 347 (with the unused-prefix _) but uses shutdown_tx.send(true) at line 460. The names don't match — won't compile.

Land-order regression between two individually-correct PRs:

Neither PR's CI re-validated the combined post-merge state, so the regression landed on main without surfacing.

This is exactly the integration gap @elezar described in #1946.

Fix

One line in crates/openshell-server/src/lib.rs:

```diff

  • let (_shutdown_tx, shutdown_rx) = watch::channel(false);
  • let (shutdown_tx, shutdown_rx) = watch::channel(false);
    ```

I verified this locally — applying the rename clears the build error, the rest of the workspace builds clean, and the existing cargo test -p openshell-server --lib suite passes (833/833).

Related

Happy to open a one-line PR if it speeds things up.

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