mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 16:25:35 +00:00
Kick client if we fail to send them a client event
This commit is contained in:
parent
b97397132d
commit
81dbf747d5
@ -112,7 +112,8 @@ bool LuaAPI::MP::TriggerClientEvent(int PlayerID, const std::string& EventName,
|
||||
}
|
||||
auto c = MaybeClient.value().lock();
|
||||
if (!Engine->Network().Respond(*c, Packet, true)) {
|
||||
beammp_lua_error("Respond failed");
|
||||
beammp_lua_error("Respond failed, dropping client " + std::to_string(PlayerID));
|
||||
Engine->Network().ClientKick(*c, "Disconnected after failing to receive packets");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user