Skip to content

Commit

Permalink
Fix concurrency issue in LoadCustomMaps by using a thread-safe collec…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
11EJDE11 committed Feb 5, 2025
1 parent c3cec7a commit ca1d2eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DXMainClient/Domain/Multiplayer/MapLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private void LoadCustomMaps()

IEnumerable<FileInfo> mapFiles = customMapsDirectory.EnumerateFiles($"*{MAP_FILE_EXTENSION}");
ConcurrentDictionary<string, Map> customMapCache = LoadCustomMapCache();
var localMapSHAs = new List<string>();
var localMapSHAs = new ConcurrentBag<string>();

var tasks = new List<Task>();

Expand Down

0 comments on commit ca1d2eb

Please sign in to comment.