aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Network/NetworkService.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2022-10-29 17:24:12 -0500
committerJP Dillingham <jpdillingham@gmail.com>2022-10-29 17:24:12 -0500
commit53273459fcbeb1de0449aab50670f1bf7a44afd3 (patch)
treef80adac9b6826fe3c6c50c9a7e761fd61196f62a /src/slskd/Network/NetworkService.cs
parente483a797f8f2a1b50397a6a72cac03430ac5dcb6 (diff)
downloadslskd-53273459fcbeb1de0449aab50670f1bf7a44afd3.tar.gz
clean up and tweak NetworkHub
Diffstat (limited to 'src/slskd/Network/NetworkService.cs')
-rw-r--r--src/slskd/Network/NetworkService.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/slskd/Network/NetworkService.cs b/src/slskd/Network/NetworkService.cs
index 7dbd79cd..6ecf5f39 100644
--- a/src/slskd/Network/NetworkService.cs
+++ b/src/slskd/Network/NetworkService.cs
@@ -54,13 +54,12 @@ namespace slskd.Network
/// <summary>
/// Retrieves a new share upload token for the specified <paramref name="agentName"/>.
/// </summary>
- /// <remarks>The token is cached internally, and is only valid while it remains in the cache.</remarks>
/// <remarks>
/// <para>This is the first step in a multi-step workflow. The entire sequence is:</para>
/// <list type="number">
/// <item>
/// A remote agent makes a request to the SignalR hub to retrieve a share upload token, which in turn
- /// calls <see cref="GenerateShareUploadToken"/>. The token is generated and cached.
+ /// calls <see cref="GenerateShareUploadToken"/>. The token is generated and cached, and is only valid while it is in the cache.
/// </item>
/// <item>
/// The remote agent makes an HTTP POST request containing a multipart upload including a backup of its
@@ -427,7 +426,7 @@ namespace slskd.Network
var key = new WaitKey(nameof(GetFileStreamAsync), agentName, id);
var wait = Waiter.Wait<Stream>(key, timeout, cancellationToken);
- await NetworkHub.Clients.Client(record.ConnectionId).RequestFile(filename, id);
+ await NetworkHub.Clients.Client(record.ConnectionId).RequestFileUpload(filename, id);
Log.Information("Requested file {Filename} from Agent {Agent} with ID {Id}. Waiting for incoming connection.", filename, agentName, id);
var task = await Task.WhenAny(wait, Task.Delay(timeout, cancellationToken));