aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application/Application.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/slskd/Application/Application.cs b/src/slskd/Application/Application.cs
index 59abcaaf..aa593679 100644
--- a/src/slskd/Application/Application.cs
+++ b/src/slskd/Application/Application.cs
@@ -134,6 +134,7 @@ namespace slskd
Client.Disconnected += Client_Disconnected;
Client.Connected += Client_Connected;
Client.LoggedIn += Client_LoggedIn;
+ Client.StateChanged += Client_StateChanged;
SoulseekClient = Client;
}
@@ -421,6 +422,11 @@ namespace slskd
logger.Write(TranslateLogLevel(args.Level), "{@Message}", args.Message);
}
+ private void Client_StateChanged(object sender, SoulseekClientStateChangedEventArgs e)
+ {
+ StateMonitor.SetValue(state => state with { Server = new ServerState() { Address = Client.Address, IPEndPoint = Client.IPEndPoint, State = Client.State, Username = Client.Username } });
+ }
+
private void Client_Connected(object sender, EventArgs e)
{
Logger.Information("Connected to the Soulseek server");