aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-11-02 20:08:57 -0500
committerJP Dillingham <jp@dillingham.me>2024-11-02 20:08:57 -0500
commit746b2e6b2bd3f989319551e7b904f24243cf39c2 (patch)
tree03642eca2b3604a8f0e0da154ce4d757b8c14c9f /src
parent28e7090da1ec2a3711f660263edf37f78506a68b (diff)
downloadslskd-746b2e6b2bd3f989319551e7b904f24243cf39c2.tar.gz
fix bug that would prevent pushbullet failures from being reported
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Integrations/Pushbullet/PushbulletService.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/slskd/Integrations/Pushbullet/PushbulletService.cs b/src/slskd/Integrations/Pushbullet/PushbulletService.cs
index 5328f4d6..29033381 100644
--- a/src/slskd/Integrations/Pushbullet/PushbulletService.cs
+++ b/src/slskd/Integrations/Pushbullet/PushbulletService.cs
@@ -145,9 +145,13 @@ namespace slskd.Integrations.Pushbullet
Log.LogDebug("Sending Pushbullet notification {Title} {Body}", title, body);
await Retry.Do(
- task: () => http.PostAsync(PushUri, content),
+ task: async () =>
+ {
+ using var response = await http.PostAsync(PushUri, content);
+ response.EnsureSuccessStatusCode();
+ },
isRetryable: (attempts, ex) => true,
- onFailure: (attempts, ex) => Log.LogWarning("Failed attempt {Attempts} to send Pushbullet notification {Title} {Body}: {Message}", attempts, title, body, ex.Message),
+ onFailure: (attempts, ex) => Log.LogWarning("Failed attempt #{Attempts} to send Pushbullet notification {Title} {Body}: {Message}", attempts, title, body, ex.Message),
maxAttempts: PushbulletOptions.RetryAttempts,
maxDelayInMilliseconds: 30000);