Disconnect all connections when reload

This commit is contained in:
2dust
2022-10-20 09:38:46 +08:00
parent 284735e9d8
commit 300b801ca4

View File

@@ -345,9 +345,10 @@ namespace clashN.Handler
public async void ClashConfigReload(string filePath)
{
ClashConnectionClose("");
try
{
var url = $"{Global.httpProtocol}{Global.Loopback}:{LazyConfig.Instance.GetConfig().APIPort}/configs";
var url = $"{Global.httpProtocol}{Global.Loopback}:{LazyConfig.Instance.GetConfig().APIPort}/configs?force=true";
Dictionary<string, string> headers = new Dictionary<string, string>();
headers.Add("path", filePath);
await HttpClientHelper.GetInstance().PutAsync(url, headers);