summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-09-03 10:20:26 +0200
committerGitHub <noreply@github.com>2021-09-03 10:20:26 +0200
commitd20031ccaec4c9ff50bc718cb8d79eefba0d7f11 (patch)
tree24036b2cc7e3886b4db92ad2ac10f6627641a51b /modules
parent8c82e305bad4fa1a716c2fa18521f7015dbb67cf (diff)
parent027fbc9a6cce94fad12d056e44e0acecf6650da7 (diff)
Merge pull request #52342 from Faless/enet/4.x_no_close_error
[Net] Silence ENetMultiplayerPeer close_connection.
Diffstat (limited to 'modules')
-rw-r--r--modules/enet/enet_multiplayer_peer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/enet/enet_multiplayer_peer.cpp b/modules/enet/enet_multiplayer_peer.cpp
index 38ca38385c..7a9a780238 100644
--- a/modules/enet/enet_multiplayer_peer.cpp
+++ b/modules/enet/enet_multiplayer_peer.cpp
@@ -393,7 +393,9 @@ bool ENetMultiplayerPeer::is_server() const {
}
void ENetMultiplayerPeer::close_connection(uint32_t wait_usec) {
- ERR_FAIL_COND_MSG(!_is_active(), "The multiplayer instance isn't currently active.");
+ if (!_is_active()) {
+ return;
+ }
_pop_current_packet();