Async task OnUpdate (#355)
* Make OnUpdate a task instead a void, handle OnUpdate better by running it in it's own task * Make helper transient, resolve mod loading issues
This commit is contained in:
@@ -22,14 +22,13 @@ public class SaveCallbacks(
|
||||
_saveServer.Load();
|
||||
}
|
||||
|
||||
public bool OnUpdate(long timeSinceLastRun)
|
||||
public Task OnUpdate(long timeSinceLastRun)
|
||||
{
|
||||
if (timeSinceLastRun > _coreConfig.ProfileSaveIntervalInSeconds)
|
||||
{
|
||||
_saveServer.Save();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user