-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Labels
Description
I am using webpush-go over at https://gitlab.com/pennersr/shove -- thanks! One thing that I initially overlooked was the fact that SendNotification() returns an http.Response, for which the following holds:
If the returned error is nil, the Response will contain a non-nil Body which the user is expected to close. If the Body is not both read to EOF and closed, the Client's underlying RoundTripper (typically Transport) may not be able to re-use a persistent TCP connection to the server for a subsequent "keep-alive" request.
The README/example contains this (it ignores the response):
// Send Notification
_, err := webpush.SendNotification(
So the fact that the caller is responsible for handling the caveat mentioned above is not very obvious.
Reactions are currently unavailable