mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-13 04:07:37 +00:00
fix: avoid nil dereference in Close (#157)
This commit is contained in:
+1
-1
@@ -302,7 +302,7 @@ func (t *TraefikOidc) Close() error {
|
||||
transport.CloseIdleConnections()
|
||||
t.safeLogDebug("Token HTTP client idle connections closed")
|
||||
}
|
||||
if t.tokenHTTPClient.Transport != t.httpClient.Transport {
|
||||
if t.httpClient == nil || t.tokenHTTPClient.Transport != t.httpClient.Transport {
|
||||
if transport, ok := t.tokenHTTPClient.Transport.(*http.Transport); ok {
|
||||
transport.CloseIdleConnections()
|
||||
t.safeLogDebug("Token HTTP client transport closed (separate from main)")
|
||||
|
||||
Reference in New Issue
Block a user