Skip to content

ping() rejects immediately in non-connected states instead of deferring (RTN13d) #2203

@paddybyers

Description

@paddybyers

Spec point

  • RTN13d: "If the connection is not in the CONNECTED state when ping() is called, the ping is deferred until the connection reaches a state that can resolve it (CONNECTED, FAILED, CLOSED, SUSPENDED)."

Observed behaviour

`ping()` immediately rejects with "not connected" when called in CONNECTING or DISCONNECTED state. There is no deferral mechanism. `ConnectionManager.ping()` checks `this.state.state !== 'connected'` and throws immediately.

Test

This deviation is documented in the Realtime UTS test suite. The adapted tests assert immediate rejection instead of deferral.

Note: This deviation is from the Realtime test suite (not REST), so there is no `RUN_DEVIATIONS` reproduction command in the current REST PR. The test is documented in `test/uts/deviations.md`.

From PR #2191, branch `uts-rest`.

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. It's clear that this does need to be fixed.uts-issueIssues raised there there is an apparent discrepancy between this library and the UTS tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions