Refine RNG usage
- Create instance once, bind it to ShadowsocksController Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
@@ -272,6 +272,7 @@ namespace Shadowsocks.Controller
|
||||
{
|
||||
SystemProxy.Update(_config, true);
|
||||
}
|
||||
Encryption.RNG.Close();
|
||||
}
|
||||
|
||||
public void TouchPACFile()
|
||||
@@ -413,6 +414,7 @@ namespace Shadowsocks.Controller
|
||||
|
||||
protected void Reload()
|
||||
{
|
||||
Encryption.RNG.Reload();
|
||||
// some logic in configuration updated the config when saving, we need to read it again
|
||||
_config = Configuration.Load();
|
||||
StatisticsConfiguration = StatisticsStrategyConfiguration.Load();
|
||||
|
||||
Reference in New Issue
Block a user