altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

RPC hangs if player disconnects

Open xxshady opened this issue 1 year ago • 2 comments

Description of the problem

See reproduction code

Reproduction steps

alt.on("playerConnect", async (player) => {
  alt.log("kick");
  player.kick();
  
  alt.log("send rpc");
   
  // never resolves (clientside handler is not needed)
  const res = await player.emitRpc("test", [1, 2, 3]);
  alt.log({ res });
});

Expected behaviour

RPC should be rejected, same as when there is no handler on remote side a "NOT_ANSWERED" error is thrown

Additional context

No response

Operating system

Windows 11

Version

16.1.0-dev.25

Crashdump ID

No response

Confirmation of issue's presence

  • [X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.

xxshady avatar Jun 30 '24 18:06 xxshady