解决cef 138版本多开软件报错问题
This commit is contained in:
1 parent
66a2d815be
commit
0492e87aee
6 files changed
+90
-72
No files matched your search
+6
-2
@@ -157,8 +157,12 @@ namespace TemuKJD
|
||||
settings.IgnoreCertificateErrors = true;
|
||||
settings.Locale = "zh-CN";
|
||||
settings.LogSeverity = LogSeverity.Disable;
|
||||
//settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache");
|
||||
settings.CachePath = null; //禁止缓存
|
||||
|
||||
var pName = Process.GetCurrentProcess().ProcessName;
|
||||
var pCount = Process.GetProcesses().Count(p => p.ProcessName == pName);
|
||||
//138版cef自己不会分缓存,会因占用导致报错,手动分缓存
|
||||
settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache\\" + pCount);
|
||||
//settings.CachePath = null; //禁止缓存
|
||||
//settings.CefCommandLineArgs.Add("enable-javascript", "1");
|
||||
//settings.CefCommandLineArgs.Add("disable-features", "NetworkService,NetworkServiceInProcess");
|
||||
Cef.Initialize(settings);
|
||||
|
||||
Reference in new issue
Block a user