mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +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
|
* @param bool $immediate
|
||||||
*/
|
*/
|
||||||
public function batchPackets(array $players, array $packets, bool $forceSync = false, bool $immediate = false){
|
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();
|
Timings::$playerNetworkTimer->startTiming();
|
||||||
|
|
||||||
$targets = [];
|
$targets = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user