mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-04 13:19:13 +00:00
Make IDAssigner.getNextID synchronized
This should prevent race conditions when allocating IDs. Fixes #386.
This commit is contained in:
parent
ef8da8054f
commit
e52d98ad8b
@ -36,7 +36,7 @@ public final class IDAssigner
|
|||||||
return getNextID( file, false );
|
return getNextID( file, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getNextID( File location, boolean directory )
|
private static synchronized int getNextID( File location, boolean directory )
|
||||||
{
|
{
|
||||||
// Determine where to locate ID file
|
// Determine where to locate ID file
|
||||||
File lastIdFile;
|
File lastIdFile;
|
||||||
|
Loading…
Reference in New Issue
Block a user