Skip to content

[JS] Buffered WebSocket client sends messages before being connected #158

@ffendt

Description

@ffendt

The buffered implementation for WebSockets has bug that it will try to send the buffered messages to the WebSocket before the WebSocket has finished connecting.

From what I can observe now, the problematic code can be found in StandardResilienceHandler#addToOutstandingBuffer. In this function, an outstanding request is added to the buffer and a timeout is started for calling #poll(). The #poll() function however does not verify if this.webSocket is already initialized.

In case the connection takes longer than the initial timeout of 500ms, this.requestBuffer#sendNectOutstanding will be called with an undefined WebSocket and crash.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions