From cae4f588cd6c3fe82c32c178bd7e9a6a228fae7f Mon Sep 17 00:00:00 2001 From: Rodrigo Alfonso Date: Sat, 4 Jan 2025 06:54:43 -0300 Subject: [PATCH] Checking config.maxPlayers when restoring connection --- lib/LinkWireless.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/LinkWireless.hpp b/lib/LinkWireless.hpp index 06c0926..bd81fb4 100644 --- a/lib/LinkWireless.hpp +++ b/lib/LinkWireless.hpp @@ -321,7 +321,8 @@ class LinkWireless { stopTimer(); startTimer(); - if (!linkRawWireless->restoreExistingConnection()) { + if (!linkRawWireless->restoreExistingConnection() || + linkRawWireless->sessionState.playerCount > config.maxPlayers) { deactivate(); return false; }