aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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);