Review
This commit is contained in:
parent
1c390f2756
commit
58020c81c9
7 changed files with 10 additions and 7 deletions
|
Can't render this file because it contains an unexpected character in line 4 and column 66.
|
|
Can't render this file because it contains an unexpected character in line 5 and column 77.
|
|
|
@ -170,11 +170,15 @@ public sealed class KeaDhcpLeaseWatcher : IHostedService
|
||||||
{
|
{
|
||||||
if (reader is null)
|
if (reader is null)
|
||||||
{
|
{
|
||||||
|
// LongRunning, force spawning a thread
|
||||||
|
// As this may block for a long time.
|
||||||
reader = await Task.Factory.StartNew(
|
reader = await Task.Factory.StartNew(
|
||||||
s => MemfileReader.From((Stream)s!),
|
s => MemfileReader.From((Stream)s!),
|
||||||
_pipe.Reader.AsStream(),
|
_pipe.Reader.AsStream(),
|
||||||
stoppingToken,
|
stoppingToken,
|
||||||
TaskCreationOptions.AttachedToParent, TaskScheduler.Default);
|
TaskCreationOptions.DenyChildAttach | TaskCreationOptions.LongRunning,
|
||||||
|
TaskScheduler.Default)
|
||||||
|
.ConfigureAwait(false);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ builder.Services.Configure<SocketTransportOptions>(options =>
|
||||||
|
|
||||||
builder.WebHost.ConfigureKestrel((context, options) =>
|
builder.WebHost.ConfigureKestrel((context, options) =>
|
||||||
{
|
{
|
||||||
if (context.Configuration.GetRequiredSection("PowerDns:Listener").Get<PowerDnsListenerOptions>() is { } pdnsOptions)
|
if (context.Configuration.GetSection("PowerDns:Listener").Get<PowerDnsListenerOptions>() is { } pdnsOptions)
|
||||||
{
|
{
|
||||||
var path = PathEx.ExpandPath(pdnsOptions.Socket);
|
var path = PathEx.ExpandPath(pdnsOptions.Socket);
|
||||||
FileInfo file = new(path);
|
FileInfo file = new(path);
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
"Dhcp": {
|
"Dhcp": {
|
||||||
"Kea": {
|
"Kea": {
|
||||||
"Dhcp4": {
|
"Dhcp4": {
|
||||||
"Leases": "../../ext/kea/dhcp4.leases"
|
"Leases": "../../ext/kea/kea-leases4.csv"
|
||||||
},
|
},
|
||||||
"Dhcp6": {
|
"Dhcp6": {
|
||||||
"Leases": "../../ext/kea/dhcp6.leases"
|
"Leases": "../../ext/kea/kea-leases6.csv"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
"Dhcp": {
|
"Dhcp": {
|
||||||
"Kea": {
|
"Kea": {
|
||||||
"Dhcp4": {
|
"Dhcp4": {
|
||||||
"Leases": "/var/lib/kea/dhcp4.leases"
|
"Leases": "/var/lib/kea/kea-leases4.csv"
|
||||||
},
|
},
|
||||||
"Dhcp6": {
|
"Dhcp6": {
|
||||||
"Leases": "/var/lib/kea/dhcp6.leases"
|
"Leases": "/var/lib/kea/kea-leases6.csv"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.2.2" />
|
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.2.2" />
|
||||||
<PackageReference Include="DotNext.Threading" Version="4.15.2" />
|
<PackageReference Include="DotNext.Threading" Version="4.15.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" PrivateAssets="all" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="8.0.0" />
|
||||||
<PackageReference Include="Sep" Version="0.4.0" />
|
<PackageReference Include="Sep" Version="0.4.0" />
|
||||||
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />
|
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue