Skip to content

Generic WebSocket message registration never drains pre-listener frames #10029

Description

@proggeramlug

The generic js_ws_on client branch registers a message callback but never drains WsConnection.messages. The receiver-specific js_ws_on_client_i64 does drain it. This loses the initial MB24 auction subscription when the native HTTP handshake completes before the async session lookup registers the callback.

Reproduction: establish an HTTP-upgraded WebSocket, send a text frame before registering the message listener, then register through js_ws_on. The frame remains buffered forever; a later identical frame reaches the listener. A Rust regression inserts two buffered frames and verifies that generic registration moves both into pending events in order.

Native MB24 trace: two initial subscriptions are sent by browsers; both authenticated connections register; neither message callback runs; a later committed bid publishes to an absent topic bucket. Five other browser scenarios pass. Re-sending the subscription restores delivery. This persists with #10028's separate GC-root fix applied.

Route generic client registration through the receiver-specific implementation so both entry points share the buffered-frame behavior. Keep this issue open for deployment retesting.

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