Skip to content

Commit 5e17df6

Browse files
committed
Fix locking on the same lock that is used for loading causes the server to freeze
1 parent 86b7e75 commit 5e17df6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/BlueMapService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
*/
7171
@DebugDump
7272
public class BlueMapService implements Closeable {
73+
7374
private final ServerInterface serverInterface;
7475
private final BlueMapConfigProvider configs;
7576

@@ -116,7 +117,7 @@ public String getWorldId(Path worldFolder) throws IOException {
116117
id = worldIds.get(worldFolder);
117118
if (id != null) return id;
118119

119-
synchronized (this) {
120+
synchronized (worldIds) {
120121
// check again if another thread has already added the world
121122
id = worldIds.get(worldFolder);
122123
if (id != null) return id;

0 commit comments

Comments
 (0)