Browse Source

Early start SIP003 plugins when reloading servers to avoid delay on first packet.

tags/4.0.6
Raif Atef 7 years ago
parent
commit
f239244af2
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      shadowsocks-csharp/Controller/ShadowsocksController.cs

+ 10
- 0
shadowsocks-csharp/Controller/ShadowsocksController.cs View File

@@ -534,6 +534,7 @@ namespace Shadowsocks.Controller
strategy.ReloadServers();
}
StartPlugins();
privoxyRunner.Start(_config);
TCPRelay tcpRelay = new TCPRelay(this, _config);
@@ -571,6 +572,15 @@ namespace Shadowsocks.Controller
Utils.ReleaseMemory(true);
}
private void StartPlugins()
{
foreach (var server in _config.configs)
{
// Early start plugin processes
GetPluginLocalEndPointIfConfigured(server);
}
}
protected void SaveConfig(Configuration newConfig)
{
Configuration.Save(newConfig);


Loading…
Cancel
Save