Skip to content

Commit

Permalink
BlueLink: extend TLS Handshake timeout (evcc-io#17429)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimmiMeloni authored Nov 25, 2024
1 parent f411113 commit aa513c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vehicle/bluelink/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func NewAPI(log *util.Logger, baseURI string, decorator func(*http.Request) erro
// api is unbelievably slow when retrieving status
v.Client.Timeout = 120 * time.Second

if transport, ok := v.Client.Transport.(*http.Transport); ok {
transport.TLSHandshakeTimeout = 30 * time.Second
}

v.Client.Transport = &transport.Decorator{
Decorator: decorator,
Base: v.Client.Transport,
Expand Down

0 comments on commit aa513c4

Please sign in to comment.