diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-15 15:55:29 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-10-15 15:55:29 -0500 |
| commit | bfaef428f820a7a3ee7145e5c28007e09d90f4ba (patch) | |
| tree | 259f2407af751672f042a7a9980998edff77ce06 /src/slskd/Network/API/Hubs | |
| parent | 6981e3b3e3ae54f55e0319e0bdd1038506eae081 (diff) | |
| parent | cdf397d340a1a4c2b4c5077adce997854a0787b2 (diff) | |
| download | slskd-bfaef428f820a7a3ee7145e5c28007e09d90f4ba.tar.gz | |
Merge branch 'agent' of github.com:slskd/slskd into agent
Diffstat (limited to 'src/slskd/Network/API/Hubs')
| -rw-r--r-- | src/slskd/Network/API/Hubs/NetworkHub.cs | 8 |
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 |
