mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-09 05:34:05 +02:00
parent
804c739038
commit
4f8c778ba0
@ -36,8 +36,14 @@ public static void RefreshTimer(){
|
||||
}
|
||||
else if (shouldRun && AutoClearTimer == null){
|
||||
AutoClearTimer = new Timer(state => {
|
||||
if (AutoClearTimer != null && CalculateCacheSize() >= Program.SystemConfig.ClearCacheThreshold*1024L*1024L){
|
||||
SetClearOnExit();
|
||||
if (AutoClearTimer != null){
|
||||
try{
|
||||
if (CalculateCacheSize() >= Program.SystemConfig.ClearCacheThreshold*1024L*1024L){
|
||||
SetClearOnExit();
|
||||
}
|
||||
}catch(Exception){
|
||||
// TODO should probably log errors and report them at some point
|
||||
}
|
||||
}
|
||||
}, null, TimeSpan.FromSeconds(30), TimeSpan.FromHours(4));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user