I get OutOfMemoryException when I call this method on startup. StartSignalR method should run a Task which calls Update() method every second.
public void StartSignalR()
{
Task t = Task.Run(() =>
{
try
{
bool push = true;
while (push)
{
Update();
}
}
catch (System.Exception ex)
{
LogManager.LogError(ex);
}
});
}
I use Task.Delay in Update()
private async static void Update()
{
await Task.Delay(1000);
Updater.MPrice();
}