Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/slskd/Relay/RelayClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,16 @@ private async Task HandleAuthenticationChallenge(string challengeToken)
{
try
{
Log.Debug("Relay controller sent an authentication challenge");
Log.Information("Relay controller sent an authentication challenge");

var options = OptionsMonitor.CurrentValue;

var agent = options.InstanceName;
var response = ComputeCredential(challengeToken);

Log.Debug("Logging in...");
Log.Information("Logging in...");
await HubConnection.InvokeAsync(nameof(RelayHub.Login), agent, response);
Log.Debug("Login succeeded.");
Log.Information("Login succeeded.");
LoggedInTaskCompletionSource?.TrySetResult();
}
catch (UnauthorizedAccessException)
Expand Down
6 changes: 0 additions & 6 deletions src/slskd/Relay/RelayService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,6 @@ public async Task<Stream> GetFileStreamAsync(string agentName, string filename,
var key = new WaitKey(nameof(GetFileStreamAsync), agentName, id);
var wait = Waiter.Wait<Stream>(key, timeout, cancellationToken);

Log.Information("Created wait {Key}", key);

await RelayHub.Clients.Client(record.ConnectionId).RequestFileUpload(filename, startOffset, id);
Log.Information("Requested file {Filename} from Agent {Agent} with ID {Id}. Waiting for incoming connection.", filename, agentName, id);

Expand Down Expand Up @@ -563,8 +561,6 @@ public void HandleFileInfoResponse(string agentName, Guid id, (bool Exists, long
{
var key = new WaitKey(nameof(GetFileInfoAsync), agentName, id);

Log.Information("Handling wait {Key}", key);

if (!Waiter.IsWaitingFor(key))
{
var msg = $"A file info response from Agent {agentName} matching Id {id} was not expected";
Expand All @@ -590,8 +586,6 @@ public async Task HandleFileStreamResponse(string agentName, Guid id, Stream res
{
var streamKey = new WaitKey(nameof(GetFileStreamAsync), agentName, id);

Log.Information("Handling wait {Key}", streamKey);

if (!Waiter.IsWaitingFor(streamKey))
{
var msg = $"A file stream response matching Id {id} is not expected";
Expand Down