Make IDAssigner.getNextID synchronized

This should prevent race conditions when allocating IDs. Fixes #386.
This commit is contained in:
SquidDev 2020-04-10 14:28:46 +01:00
parent ef8da8054f
commit e52d98ad8b
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ public static int getNextIDFromFile( File file )
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
File lastIdFile;