mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-18 04:47:28 +00:00
fix: workaround for yaegi type checking using reflection (#159)
This commit is contained in:
+3
-3
@@ -291,19 +291,19 @@ func (t *TraefikOidc) Close() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if t.httpClient != nil {
|
if t.httpClient != nil {
|
||||||
if transport, ok := t.httpClient.Transport.(*http.Transport); ok {
|
if transport, ok := t.httpClient.Transport.(*http.Transport); ok && transport != nil {
|
||||||
transport.CloseIdleConnections()
|
transport.CloseIdleConnections()
|
||||||
t.safeLogDebug("HTTP client idle connections closed")
|
t.safeLogDebug("HTTP client idle connections closed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.tokenHTTPClient != nil {
|
if t.tokenHTTPClient != nil {
|
||||||
if transport, ok := t.tokenHTTPClient.Transport.(*http.Transport); ok {
|
if transport, ok := t.tokenHTTPClient.Transport.(*http.Transport); ok && transport != nil {
|
||||||
transport.CloseIdleConnections()
|
transport.CloseIdleConnections()
|
||||||
t.safeLogDebug("Token HTTP client idle connections closed")
|
t.safeLogDebug("Token HTTP client idle connections closed")
|
||||||
}
|
}
|
||||||
if t.httpClient == nil || 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 {
|
if transport, ok := t.tokenHTTPClient.Transport.(*http.Transport); ok && transport != nil {
|
||||||
transport.CloseIdleConnections()
|
transport.CloseIdleConnections()
|
||||||
t.safeLogDebug("Token HTTP client transport closed (separate from main)")
|
t.safeLogDebug("Token HTTP client transport closed (separate from main)")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user