Skip to content

[BUG] Two tables with connected clients #170

Closed

Description

@alex35mil

I'm not sure if it's a bug or if I just don't understand the implementation, but the current ws server has two tables with connected clients:

  1. ---@field clients table A list of connected clients
  2. ---@field clients table Table of connected clients (client_id -> WebSocketClient)

It seems like they store the same thing, but they are pretty much out of sync most of the time.

What I see:

  • when I open CC terminal, both receive a new client connection (identical)
  • when I hit Ctrl-C in CC terminal (exit session), its client connection is removed from both tables, but immediately after, a new connection appears in server/init, but not in server/tcp. server/init constantly grows with these phantom connections that appear after each terminated session. I can't figure out what initiates this connection and why it stays in the server/init clients table.

Is this by design? What initiates this second connection after the session termination?

Activity

  1. ThomasK33 commented on Jan 26, 2026

    @ThomasK33
    Member

    Hey @alex35mil, thanks for opening this issue and pointing it out.
    No, this wasn’t by design. It's mostly a leftover artifact from some earlier attempts that weren’t cleaned up properly.

    I've just merged a PR that consolidates those two tables into one.

  2. ThomasK33 commented on Nov 9, 2026

    @ThomasK33
    Member

    The fix for this issue (#176) is now released in v0.4.0. Update the plugin to get it.


    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

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