Skip to content

Commit

Permalink
Fix exceptions in join function crashing server
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim "timmyRS" Speckhals committed Jan 18, 2020
1 parent c8315ef commit e6d62b2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Server.php
Expand Up @@ -306,7 +306,14 @@ private function handle(bool $full): void
}
if($this->join_function)
{
($this->join_function)($con);
try
{
($this->join_function)($con);
}
catch(Exception $e)
{
$con->disconnect(get_class($e).": ".$e->getMessage());
}
}
$con->next_heartbeat = microtime(true) + 15;
});
Expand Down

0 comments on commit e6d62b2

Please sign in to comment.