aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Core/State.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/slskd/Core/State.cs b/src/slskd/Core/State.cs
index c2039522..df670893 100644
--- a/src/slskd/Core/State.cs
+++ b/src/slskd/Core/State.cs
@@ -19,6 +19,7 @@ namespace slskd
{
using System;
using System.Collections.Generic;
+ using System.Linq;
using System.Net;
using System.Text.Json.Serialization;
using slskd.Network;
@@ -67,14 +68,14 @@ namespace slskd
public record NetworkState
{
public OperationMode Mode { get; init; }
- public NetworkControllerState Controller { get; init; }
- public IReadOnlyCollection<Agent> Agents { get; init; }
+ public NetworkControllerState Controller { get; init; } = new NetworkControllerState();
+ public IReadOnlyCollection<Agent> Agents { get; init; } = Enumerable.Empty<Agent>().ToList().AsReadOnly();
}
public record NetworkControllerState
{
public string Address { get; init; }
- public NetworkClientState State { get; init; }
+ public NetworkClientState State { get; init; } = NetworkClientState.Disconnected;
}
public record UserState