diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-11-18 16:13:26 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-18 16:13:26 -0600 |
| commit | 1ea40a325479d543714910a2848fcba0249f3724 (patch) | |
| tree | 998092ec045804bce76d1753df460f817db134c3 /src/slskd/Application.cs | |
| parent | 43c3a052796fbd490677de931c2b6925efa0fa5e (diff) | |
| parent | 8c67a655322fc787ef8677ebbded1596dab36b4d (diff) | |
| download | slskd-1ea40a325479d543714910a2848fcba0249f3724.tar.gz | |
Merge pull request #758 from slskd/disable-relay
Add an option to disable Relay functionality
Diffstat (limited to 'src/slskd/Application.cs')
| -rw-r--r-- | src/slskd/Application.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 531355a5..0c7815e5 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -398,18 +398,22 @@ 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>() == OperationMode.Agent) + else if (OptionsAtStartup.Relay.Enabled && OptionsAtStartup.Relay.Mode.ToEnum<OperationMode>() == 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>() == OperationMode.Debug) + if (OptionsAtStartup.Relay.Enabled && OptionsAtStartup.Relay.Mode.ToEnum<OperationMode>() == OperationMode.Debug) { Log.Warning("Running in Debug relay mode; connecting to controller"); _ = Relay.Client.StartAsync(cancellationToken); } + else + { + Log.Information("Running in Controller relay mode. Listening for incoming Agent connections."); + } await Client.ConnectAsync(OptionsAtStartup.Soulseek.Username, OptionsAtStartup.Soulseek.Password).ConfigureAwait(false); } |
