From 25f33999afaa72629b4a94e0370b1fee62f6d2db Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Thu, 2 Sep 2021 15:26:23 +0200 Subject: [PATCH] [Net] Silence ENetMultiplayerPeer close_connection. Used to print an error when it was not active, now it just returns immediately as per the documentation. --- modules/enet/networked_multiplayer_enet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index 2383fae386b..a249d703786 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -446,7 +446,9 @@ bool NetworkedMultiplayerENet::is_server() const { } void NetworkedMultiplayerENet::close_connection(uint32_t wait_usec) { - ERR_FAIL_COND_MSG(!active, "The multiplayer instance isn't currently active."); + if (!active) { + return; + } _pop_current_packet();