diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-11-02 10:20:02 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-11-02 10:20:02 -0500 |
| commit | e63dbd6f64a7d1fbd175ff1007d2dcd9c1070353 (patch) | |
| tree | c29807d9d8bac30f03907cc6cc3d3fb10b04e278 /src | |
| parent | bbce090ad560859cb318642bebc8254459745d11 (diff) | |
| download | slskd-e63dbd6f64a7d1fbd175ff1007d2dcd9c1070353.tar.gz | |
actually fix the bugs
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Network/API/Hubs/NetworkHub.cs | 4 |
1 files changed, 2 insertions, 2 deletions
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 /// <exception cref="UnauthorizedAccessException">Thrown when the agent is not fully authenticated.</exception> 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 /// <exception cref="UnauthorizedAccessException">Thrown when the agent is not fully authenticated.</exception> 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(); |
