pull/5891/head
2dust 2024-10-23 10:18:55 +08:00
parent 50bdf0927c
commit 1e7284f141
2 changed files with 16 additions and 11 deletions

View File

@ -77,8 +77,9 @@ public class PacHandler
stream.Flush(); stream.Flush();
}); });
} }
catch (Exception e) catch
{ {
// ignored
} }
} }
}, TaskCreationOptions.LongRunning); }, TaskCreationOptions.LongRunning);
@ -86,17 +87,16 @@ public class PacHandler
public static void Stop() public static void Stop()
{ {
if (_tcpListener != null) if (_tcpListener == null) return;
{
try try
{ {
_isRunning = false; _isRunning = false;
_tcpListener.Stop(); _tcpListener.Stop();
_tcpListener = null; _tcpListener = null;
} }
catch (Exception e) catch
{ {
} // ignored
} }
} }
} }

View File

@ -503,6 +503,11 @@ namespace ServiceLib.Services
} }
} }
var path = Utils.GetBinPath("srss");
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
foreach (var item in geoipFiles.Distinct()) foreach (var item in geoipFiles.Distinct())
{ {
await UpdateSrsFile("geoip", item, config, updateFunc); await UpdateSrsFile("geoip", item, config, updateFunc);