aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-01-19 21:39:02 -0600
committerGitHub <noreply@github.com>2026-01-19 21:39:02 -0600
commit337fe1c7abb9af3b1915bca18224fe4869b52eb4 (patch)
tree05a555671a711d398162604c857ceda952afe130 /src
parent6fdc317978fd91fbfd5828ee72c7e7f19c316b13 (diff)
parent8df8159530a3446b528b1e4c2960cd19f577275f (diff)
downloadslskd-337fe1c7abb9af3b1915bca18224fe4869b52eb4.tar.gz
Merge pull request #1610 from slskd/relay
Include agentName when completing agent GetFileStreamAsync
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Relay/API/Hubs/RelayHub.cs2
-rw-r--r--src/slskd/Relay/RelayService.cs8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/slskd/Relay/API/Hubs/RelayHub.cs b/src/slskd/Relay/API/Hubs/RelayHub.cs
index 333bd529..dd39583a 100644
--- a/src/slskd/Relay/API/Hubs/RelayHub.cs
+++ b/src/slskd/Relay/API/Hubs/RelayHub.cs
@@ -218,7 +218,7 @@ namespace slskd.Relay
Log.Warning("Agent {Agent} (connection {ConnectionId}) from {IP} reported upload failure for {Id}: {Message}", record.Agent, Context.ConnectionId, RemoteIpAddress, id, exception.Message);
- Relay.NotifyFileStreamException(id, exception);
+ Relay.NotifyFileStreamException(record.Agent.Name, id, exception);
}
/// <summary>
diff --git a/src/slskd/Relay/RelayService.cs b/src/slskd/Relay/RelayService.cs
index 7d5602a5..96eb9f74 100644
--- a/src/slskd/Relay/RelayService.cs
+++ b/src/slskd/Relay/RelayService.cs
@@ -190,9 +190,10 @@ namespace slskd.Relay
/// <summary>
/// Notifies the caller of <see cref="GetFileStreamAsync"/> of a failure to obtain a file stream from the requested agent.
/// </summary>
+ /// <param name="agentName">The name of the agent.</param>
/// <param name="id">The unique ID for the stream.</param>
/// <param name="exception">The remote exception that caused the failure.</param>
- void NotifyFileStreamException(Guid id, Exception exception);
+ void NotifyFileStreamException(string agentName, Guid id, Exception exception);
/// <summary>
/// Registers the specified <paramref name="agent"/> with the specified <paramref name="connectionId"/>.
@@ -656,11 +657,12 @@ namespace slskd.Relay
/// <summary>
/// Notifies the caller of <see cref="GetFileStreamAsync"/> of a failure to obtain a file stream from the requested agent.
/// </summary>
+ /// <param name="agentName">The name of the agent.</param>
/// <param name="id">The unique ID for the stream.</param>
/// <param name="exception">The remote exception that caused the failure.</param>
- public void NotifyFileStreamException(Guid id, Exception exception)
+ public void NotifyFileStreamException(string agentName, Guid id, Exception exception)
{
- var key = new WaitKey(nameof(GetFileStreamAsync), id);
+ var key = new WaitKey(nameof(GetFileStreamAsync), agentName, id);
Waiter.Throw(key, exception);
}