Commit d3bc1be6 d3bc1be6db2211b3a5071081ba09583783d12cc1 by Christian Gerdes

Fix in SSL Session Cache Disabled

Small performance fix.
1 parent c2cc16a9
...@@ -55,7 +55,7 @@ namespace LIL_VSTT_Plugins ...@@ -55,7 +55,7 @@ namespace LIL_VSTT_Plugins
55 System.Reflection.Assembly asm = System.Reflection.Assembly.GetAssembly(typeof(System.Net.Security.SslStream)); 55 System.Reflection.Assembly asm = System.Reflection.Assembly.GetAssembly(typeof(System.Net.Security.SslStream));
56 Type t = asm.GetType("System.Net.Security.SslSessionsCache"); 56 Type t = asm.GetType("System.Net.Security.SslSessionsCache");
57 System.Reflection.FieldInfo f = t.GetField("s_CachedCreds", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); 57 System.Reflection.FieldInfo f = t.GetField("s_CachedCreds", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
58 f.SetValue(null, new ZeroHashtable()); 58 f.SetValue(null, new ZeroHashtable(32));
59 } 59 }
60 60
61 void undoIt() 61 void undoIt()
...@@ -69,6 +69,8 @@ namespace LIL_VSTT_Plugins ...@@ -69,6 +69,8 @@ namespace LIL_VSTT_Plugins
69 69
70 public class ZeroHashtable : System.Collections.Hashtable 70 public class ZeroHashtable : System.Collections.Hashtable
71 { 71 {
72 public ZeroHashtable(int capacity) : base(capacity) { }
73
72 public override int Count 74 public override int Count
73 { 75 {
74 get { if(base.Count % 32 == 0) this.Clear(); return 0; } 76 get { if(base.Count % 32 == 0) this.Clear(); return 0; }
......