altmp / altv-js-module

JS module for alt:V Multiplayer. Powered by NodeJS & v8
MIT License
55 stars 35 forks source link

RPC freezed after second call #305

Closed mrgharabaghi closed 1 year ago

mrgharabaghi commented 1 year ago

Description of the problem

If you're using emitRpc every 1 second, server will freeze.

Reproduction steps

// Client side
setInterval(async () => {
    const data = await alt.emitRpc('giveMeData');
}, 1000);
// Server side
alt.onRpc('giveMeData', async () => {
    await alt.Utils.wait(500);
    return 123;
});

Expected behaviour

Should not freeze.

Additional context

Nothing.

Operating system

Windows 10

Version

dev/15.0-dev711

Scope

server

Reproduction tested

xLuxy commented 1 year ago

Fixed in server (dev/15.0-dev717) - on client it will be fixed once module is updated in core