aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Network/API/Hubs/NetworkHub.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-10-15 15:55:29 -0500
committerJP Dillingham <jp@dillingham.me>2022-10-15 15:55:29 -0500
commitbfaef428f820a7a3ee7145e5c28007e09d90f4ba (patch)
tree259f2407af751672f042a7a9980998edff77ce06 /src/slskd/Network/API/Hubs/NetworkHub.cs
parent6981e3b3e3ae54f55e0319e0bdd1038506eae081 (diff)
parentcdf397d340a1a4c2b4c5077adce997854a0787b2 (diff)
downloadslskd-bfaef428f820a7a3ee7145e5c28007e09d90f4ba.tar.gz
Merge branch 'agent' of github.com:slskd/slskd into agent
Diffstat (limited to 'src/slskd/Network/API/Hubs/NetworkHub.cs')
-rw-r--r--src/slskd/Network/API/Hubs/NetworkHub.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slskd/Network/API/Hubs/NetworkHub.cs b/src/slskd/Network/API/Hubs/NetworkHub.cs
index 78a658d4..6d43e6da 100644
--- a/src/slskd/Network/API/Hubs/NetworkHub.cs
+++ b/src/slskd/Network/API/Hubs/NetworkHub.cs
@@ -99,5 +99,13 @@ namespace slskd.Network
Log.Information("Agent connection {Id} requested a share upload token, but was not registered.", Context.ConnectionId);
throw new UnauthorizedAccessException();
}
+
+ public void NotifyUploadFailed(Guid id)
+ {
+ if (Network.PendingFileUploads.TryGetValue(id, out var record))
+ {
+ record.Stream.SetException(new NotFoundException("The file could not be uploaded from the remote agent"));
+ }
+ }
}
} \ No newline at end of file