potentially fix pets and summons

This commit is contained in:
Stanley Dimant
2022-09-03 22:54:58 +02:00
parent bd947d8f2a
commit 2e3f7aad2b
4 changed files with 62 additions and 13 deletions

View File

@@ -49,7 +49,7 @@ namespace MareSynchronos.Managers
public string WatchedPenumbraDirectory => (_penumbraDirWatcher?.EnableRaisingEvents ?? false) ? _penumbraDirWatcher!.Path : "Not watched";
public FileCache? Create(string file, CancellationToken token)
public FileCache? Create(string file, CancellationToken? token)
{
FileInfo fileInfo = new(file);
int attempt = 0;
@@ -57,7 +57,7 @@ namespace MareSynchronos.Managers
{
Thread.Sleep(1000);
Logger.Debug("Waiting for file release " + fileInfo.FullName + " attempt " + attempt);
token.ThrowIfCancellationRequested();
token?.ThrowIfCancellationRequested();
}
if (attempt >= 10) return null;