From 5d83002177a489dbff8ec00fa9f9f24c96043289 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 18 Nov 2022 14:30:53 -0600 Subject: only connect agent if relay is enabled --- src/slskd/Application.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/slskd') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 531355a5..3c0c1e7f 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -398,14 +398,14 @@ namespace slskd { Log.Warning($"Not connecting to the Soulseek server; username and/or password invalid. Specify valid credentials and manually connect, or update config and restart."); } - else if (OptionsAtStartup.Relay.Mode.ToEnum() == OperationMode.Agent) + else if (OptionsAtStartup.Relay.Enabled && OptionsAtStartup.Relay.Mode.ToEnum() == OperationMode.Agent) { Log.Information("Running in Agent relay mode; not connecting to the Soulseek server."); await Relay.Client.StartAsync(cancellationToken); } else { - if (OptionsAtStartup.Relay.Mode.ToEnum() == OperationMode.Debug) + if (OptionsAtStartup.Relay.Enabled && OptionsAtStartup.Relay.Mode.ToEnum() == OperationMode.Debug) { Log.Warning("Running in Debug relay mode; connecting to controller"); _ = Relay.Client.StartAsync(cancellationToken); -- cgit v1.2.3