Merge pull request #52342 from Faless/enet/4.x_no_close_error

[Net] Silence ENetMultiplayerPeer close_connection.
This commit is contained in:
Fabio Alessandrelli 2021-09-03 10:20:26 +02:00 committed by GitHub
commit d20031ccae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();