mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-06-10 13:30:49 +00:00
Pass context to tls.Dialer in tryDialWithSNI.
This cleans up resources that would otherwise be tied up by Caddy endpoint requests where the originating TLS connection to Caddy has went away. V12-Ref: F-77195
This commit is contained in:
+2
-1
@@ -81,7 +81,8 @@ func tryDialWithSNI(ctx context.Context, domain string) (bool, error) {
|
||||
}
|
||||
|
||||
logc.Printf(ctx, "caddy: check TLS %s", fallbackURL)
|
||||
connection, err := tls.Dial("tcp", connectHost, &tls.Config{ServerName: domain})
|
||||
dialer := tls.Dialer{Config: &tls.Config{ServerName: domain}}
|
||||
connection, err := dialer.DialContext(ctx, "tcp", connectHost)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user