Skip to content

WebSocket transport does not allow healing connectionsΒ #58

@tom-sherman

Description

@tom-sherman

In other words, the session does not allow the websocket to reopen after it closes - the session is immediately aborted.

A way to reproduce this is with using reconnecting-websocket or partysocket.

import { newWebSocketRpcSession } from "capnweb";
import { WebSocket as ReconnectingWebsocket } from "partysocket";

const sesssion = newWebSocketRpcSession(
  new ReconnectingWebsocket("ws://localhost:8001/rpc")
);

Is this intentional behaviour of the default websocket transport? If so, would a new ReconnectingWebsocket transport be acceptable or should this be left to userland? I'm not sure what your thoughts are about adding new transports to core.

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