Describe the bug
After the PlayerRemoving event fires for a player, if any calls are made to Fire or another dispatcher, zap adds that Player to player_map again on the server. This is then never cleaned up and persists forever.
Reproduction
event Test = {
from: Server,
type: Reliable,
call: ManyAsync,
data: (),
}
Playground link
local Players = game:GetService("Players")
local network = require("./network/server")
Players.PlayerRemoving:Connect(function(player)
task.wait(5)
network.Test.Fire(player)
print("Player will remain in player_map forever!")
end)
Expected behavior
Although this event has been fired in error (after player has left), zap should protect against this or issue a warning when this occurs. As it stands, an event firing seconds after the player leaves silently causes a memory leak.
Describe the bug
After the
PlayerRemovingevent fires for a player, if any calls are made toFireor another dispatcher, zap adds that Player toplayer_mapagain on the server. This is then never cleaned up and persists forever.Reproduction
event Test = { from: Server, type: Reliable, call: ManyAsync, data: (), }Playground link
Expected behavior
Although this event has been fired in error (after player has left), zap should protect against this or issue a warning when this occurs. As it stands, an event firing seconds after the player leaves silently causes a memory leak.