Skip to content
This repository was archived by the owner on Sep 27, 2022. It is now read-only.
This repository was archived by the owner on Sep 27, 2022. It is now read-only.

Repeat call multiple times leads to rpc to freeze #15

@luizstacio

Description

@luizstacio

Using the code below;

Receiver

const rpc = new RPC({
 target: window,
 serviceId: 'my-service-id'
});

rpc.expose('myMethod', (a: number) => a);

Sender

const rpc = new RPC({
 target: window,
 serviceId: 'my-service-id'
});

rpc.call('myMethod', 1); // returns ok
rpc.call('myMethod', 1); // returns ok
rpc.call('myMethod', 1); // stop returning
rpc.call('myMethod', 1); // stop returning
... any other call will not return...

Debugging, I notice the issue happens because the this.callCounter sent on the call is one count above the this.lastSequentialCall.

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