Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Timeout connect in server.properties #3957

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pocketmine/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,7 @@ public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $
"announce-player-achievements" => true,
"spawn-protection" => 16,
"max-players" => 20,
"timeout" => 10,
"allow-flight" => false,
"spawn-animals" => true,
"spawn-mobs" => true,
Expand Down Expand Up @@ -2309,7 +2310,7 @@ public function sendRecipeList(Player $p){

private function checkTickUpdates($currentTick, $tickTime){
foreach($this->players as $p){
if(!$p->loggedIn and ($tickTime - $p->creationTime) >= 10){
if(!$p->loggedIn and ($tickTime - $p->creationTime) >= $this->getConfigInt("timeout", 10)){
$p->close("", "Login timeout");
}elseif($this->alwaysTickPlayers){
$p->onUpdate($currentTick);
Expand Down