You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
[ENet] Explicitely destroy hosts on close
To ensure we free up the UDP port even if a script is holding a reference to the underlying host, we need to explicitly destroy it on close.
This commit is contained in:
@@ -301,6 +301,7 @@ void ENetMultiplayerPeer::close() {
|
||||
}
|
||||
for (KeyValue<int, Ref<ENetConnection>> &E : hosts) {
|
||||
E.value->flush();
|
||||
E.value->destroy();
|
||||
}
|
||||
|
||||
active_mode = MODE_NONE;
|
||||
|
||||
Reference in New Issue
Block a user