Skip to content

Commit f3bc0e5

Browse files
BabakSamimiTwoTenPvP
authored andcommitted
fix(unet-channels): Invoking .Clear() on two Dictionaries within the Shutdown-function (#199)
* fix(unet-channels): Invoking .Clear() on two Dictionaries within the Shutdown-function GetConfig() will try to insert new kvp-pairs even though they already exists. Clearing them fixes this and allow, for example, doing StartHost() -> StopHost() -> StartHost() within the same session. * changed the fields back to read-only
1 parent f1bb0f4 commit f3bc0e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

MLAPI/Data/Transports/UNET/UnetTransport.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ public override ulong GetCurrentRtt(ulong clientId)
202202

203203
public override void Shutdown()
204204
{
205+
channelIdToName.Clear();
206+
channelNameToId.Clear();
205207
NetworkTransport.Shutdown();
206208
}
207209

0 commit comments

Comments
 (0)