diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-11-02 10:26:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-02 10:26:14 -0500 |
| commit | 11fdf4f204af53b83b23626ba8afea4832a4111e (patch) | |
| tree | c29807d9d8bac30f03907cc6cc3d3fb10b04e278 /src/slskd/Network/API | |
| parent | 8238ccee6c1b10353f42b1f435ced652d2867dd3 (diff) | |
| parent | f5080fc35bd1c4060d89b93dd88b7735a2de7951 (diff) | |
| download | slskd-11fdf4f204af53b83b23626ba8afea4832a4111e.tar.gz | |
Merge pull request #728 from slskd/paths
Fix more network bugs
Diffstat (limited to 'src/slskd/Network/API')
| -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(); |
