diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-09-03 10:20:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-03 10:20:26 +0200 |
commit | d20031ccaec4c9ff50bc718cb8d79eefba0d7f11 (patch) | |
tree | 24036b2cc7e3886b4db92ad2ac10f6627641a51b | |
parent | 8c82e305bad4fa1a716c2fa18521f7015dbb67cf (diff) | |
parent | 027fbc9a6cce94fad12d056e44e0acecf6650da7 (diff) |
Merge pull request #52342 from Faless/enet/4.x_no_close_error
[Net] Silence ENetMultiplayerPeer close_connection.
-rw-r--r-- | modules/enet/enet_multiplayer_peer.cpp | 4 |
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(); |