From e63dbd6f64a7d1fbd175ff1007d2dcd9c1070353 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 2 Nov 2022 10:20:02 -0500 Subject: actually fix the bugs --- src/slskd/Network/API/Hubs/NetworkHub.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/slskd/Network/API/Hubs') diff --git a/src/slskd/Network/API/Hubs/NetworkHub.cs b/src/slskd/Network/API/Hubs/NetworkHub.cs index 5fd4aacb..5f56e538 100644 --- a/src/slskd/Network/API/Hubs/NetworkHub.cs +++ b/src/slskd/Network/API/Hubs/NetworkHub.cs @@ -128,7 +128,7 @@ namespace slskd.Network /// Thrown when the agent is not fully authenticated. public Guid BeginShareUpload() { - if (Network.TryGetAgentRegistration(Context.ConnectionId, out var record)) + if (!Network.TryGetAgentRegistration(Context.ConnectionId, out var record)) { // this can happen if the agent attempts to upload before logging in Log.Information("Agent connection {Id} requested a share upload token, but is not registered.", Context.ConnectionId); @@ -148,7 +148,7 @@ namespace slskd.Network /// Thrown when the agent is not fully authenticated. public void NotifyFileUploadFailed(Guid id, Exception exception) { - if (Network.TryGetAgentRegistration(Context.ConnectionId, out var record)) + if (!Network.TryGetAgentRegistration(Context.ConnectionId, out var record)) { Log.Warning("Agent connection {Id} attempted to report a failed upload, but is not registered.", Context.ConnectionId); throw new UnauthorizedAccessException(); -- cgit v1.2.3