TriggerLatentEvent triggering multiple times

It appears Latent events aren’t working properly, they trigger correctly but sometimes trigger multiple times.
This happens whenever the bits per second is higher than the amount of bits transmitted (or when there’s bits leftover in buffer after all data is read , has something to do with the buffer probably)

IE: you sent something containing 2 bytes like “hi” through a latent event with 2000000 bps it will trigger 1000000 times (give or take, haven’t looked into the exact numbers)

I’ve included a small test resource to illustrate the issue, it builds a string containg 1000 entries of test and sends it with 1000000 bps, it results in the client event running aprox. 214 times. It also includes the log illustrating the resulting debug print at the end of the file
latenteventbug.zip (72.7 KB)

WARNING

If you post here without knowing what you’re doing you’ll most likely get suspended, you should probably post in #technical-support instead.

This is likely related to there being no timer on resending… not sure if that’d be a proper fix but at least having a repro should show if it does help.

Issue is still present.
I can add that it seems to work with bps=0
Here is a video with the repro resource from first post.

0 shouldn’t send at all, please don’t rely on this… I don’t know if/when I’ll be able to check on this at all though.

This is likely related to there being no timer on resending… not sure if that’d be a proper fix but at least having a repro should show if it does help…