Cardata: fix mqtt receive and logging

This commit is contained in:
andig 2025-10-10 15:40:56 +02:00
parent eeda65858c
commit 0940b325f6
2 changed files with 3 additions and 2 deletions

View file

@ -6,6 +6,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"net/http"
"net/url"
"strings"
"sync"
@ -111,7 +112,7 @@ func NewOauth(ctx context.Context, name, device string, oc *oauth2.Config, opts
log := util.NewLogger("oauth-" + hash)
if ctx.Value(oauth2.HTTPClient) == nil {
if client, ok := ctx.Value(oauth2.HTTPClient).(*http.Client); client == nil || !ok {
ctx = context.WithValue(ctx, oauth2.HTTPClient, request.NewClient(log))
}