mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Server: bail on trying to send empty batch (issue #2020)
This commit is contained in:
parent
f66928c345
commit
6307952ae9
@ -1891,6 +1891,9 @@ class Server{
|
||||
* @param bool $immediate
|
||||
*/
|
||||
public function batchPackets(array $players, array $packets, bool $forceSync = false, bool $immediate = false){
|
||||
if(empty($packets)){
|
||||
throw new \InvalidArgumentException("Cannot send empty batch");
|
||||
}
|
||||
Timings::$playerNetworkTimer->startTiming();
|
||||
|
||||
$targets = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user