Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Guard against invalid push server response as an addition check for #2855

Gabe Kangasef8bcd009ce7
diff --git a/notifications/browser/browser.go b/notifications/browser/browser.go
index 0740d777fd..6d97a79498 100644
--- a/notifications/browser/browser.go
+++ b/notifications/browser/browser.go
@@ -76,10 +76,15 @@ func (b *Browser) Send(
return false, errors.Wrap(err, "error sending browser push notification")
}
+ if resp == nil {
+ return false, errors.New("no response from web push server")
+ }
+
+ defer resp.Body.Close()
+
if resp.StatusCode == 410 {
return true, nil
}
- defer resp.Body.Close()
return false, err
}