diff --git a/pkg/tapo/client.go b/pkg/tapo/client.go index 78bf5fce..c19267ff 100644 --- a/pkg/tapo/client.go +++ b/pkg/tapo/client.go @@ -291,7 +291,8 @@ func dial(req *http.Request, brand, username, password string) (net.Conn, *http. if err != nil { return nil, nil, err } - _, _ = io.Copy(io.Discard, res.Body) // ignore response body + _, _ = io.Copy(io.Discard, res.Body) // discard leftovers + _ = res.Body.Close() // ignore response body auth := res.Header.Get("WWW-Authenticate")