Update pkg/tapo/client.go

Co-authored-by: Sergey Vilgelm <523825+SVilgelm@users.noreply.github.com>
This commit is contained in:
Timo Christeleit
2025-01-09 09:44:23 +01:00
committed by GitHub
parent 8e4088e08f
commit 2ca97a42c5

View File

@@ -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")