Skip to content

Commit

Permalink
ObjectPool IsUdpEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mili-tan committed Nov 7, 2023
1 parent 5a8416d commit eeffa25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Arashi.Aoi/Routes/DnsQueryRoutes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ class DnsQueryRoutes
public static IPEndPoint BackUpEndPoint = IPEndPoint.Parse(Config.BackUpStream);

public static ObjectPool<DnsClient> UpPool = new(() =>
new DnsClient(UpEndPoint.Address, Config.TimeOut, UpEndPoint.Port != 0 ? UpEndPoint.Port : 53));
new DnsClient(UpEndPoint.Address, Config.TimeOut, UpEndPoint.Port != 0 ? UpEndPoint.Port : 53)
{IsUdpEnabled = !Config.OnlyTcpEnable, IsTcpEnabled = true});

public static ObjectPool<DnsClient> BackUpPool = new(() =>
new DnsClient(BackUpEndPoint.Address, Config.TimeOut, BackUpEndPoint.Port != 0 ? UpEndPoint.Port : 53));
new DnsClient(BackUpEndPoint.Address, Config.TimeOut, BackUpEndPoint.Port != 0 ? UpEndPoint.Port : 53)
{IsUdpEnabled = !Config.OnlyTcpEnable, IsTcpEnabled = true});


public static void DnsQueryRoute(IEndpointRouteBuilder endpoints)
Expand Down

0 comments on commit eeffa25

Please sign in to comment.