diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-09-02 15:21:09 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-09-02 15:21:09 +0200 |
commit | 027fbc9a6cce94fad12d056e44e0acecf6650da7 (patch) | |
tree | 080a74a5b994929ec39358cdc2dfecaf8a243dc6 /modules/enet | |
parent | c97afc033f720a68b3ea8dabb2956d836d13613e (diff) |
[Net] Silence ENetMultiplayerPeer close_connection.
Used to print an error when it was not active, now it just returns
immediately as per the documentation.
Diffstat (limited to 'modules/enet')
-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(); |