Skip to content

Commit 034090e

Browse files
authored
Fix concurrency issue in LoadCustomMaps by using a thread-safe collection (#659)
1 parent c3cec7a commit 034090e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DXMainClient/Domain/Multiplayer/MapLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private void LoadCustomMaps()
164164

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

169169
var tasks = new List<Task>();
170170

0 commit comments

Comments
 (0)