mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-29 02:34:06 +02:00
parent
804c739038
commit
4f8c778ba0
@ -36,8 +36,14 @@ public static void RefreshTimer(){
|
|||||||
}
|
}
|
||||||
else if (shouldRun && AutoClearTimer == null){
|
else if (shouldRun && AutoClearTimer == null){
|
||||||
AutoClearTimer = new Timer(state => {
|
AutoClearTimer = new Timer(state => {
|
||||||
if (AutoClearTimer != null && CalculateCacheSize() >= Program.SystemConfig.ClearCacheThreshold*1024L*1024L){
|
if (AutoClearTimer != null){
|
||||||
SetClearOnExit();
|
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));
|
}, null, TimeSpan.FromSeconds(30), TimeSpan.FromHours(4));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user