added ack packet limit

This commit is contained in:
GameHerobrine 2026-10-27 12:16:29 +03:00
parent 5023bb2286
commit 7166d58916
4 changed files with 59 additions and 6 deletions

View file

@ -223,7 +223,7 @@ class Player{
$this->chatMessagesQueue->data = [];
//$this->server->schedule(20 * 60, [$this, "clearQueue"], [], true);
$this->server->interface->maxACKsAllowed["{$this->ip}:{$this->port}"] = 0;
$this->evid[] = $this->server->event("server.close", [$this, "close"]);
console("[DEBUG] New Session started with $ip:$port. MTU {$this->MTU}, Client ID {$this->clientID}", true, true, 2);
}
@ -2021,6 +2021,10 @@ class Player{
//$this->entity->close();
}
}
public function __destruct(){ //pwease dont leak memory >_<
unset($this->server->interface->maxACKsAllowed["{$this->ip}:{$this->port}"]);
}
public function save(){
if($this->entity instanceof Entity){