Update containers/buildah v1.24.1

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2022-02-03 18:33:22 -05:00
parent 608b6142ed
commit 1d1b2b1509
42 changed files with 1491 additions and 1224 deletions

View File

@ -3,6 +3,7 @@
package sockets
import (
"context"
"fmt"
"net"
"net/http"
@ -10,7 +11,10 @@ import (
"time"
)
const maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path)
const (
defaultTimeout = 10 * time.Second
maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path)
)
func configureUnixTransport(tr *http.Transport, proto, addr string) error {
if len(addr) > maxUnixSocketPathSize {
@ -18,8 +22,11 @@ func configureUnixTransport(tr *http.Transport, proto, addr string) error {
}
// No need for compression in local communications.
tr.DisableCompression = true
tr.Dial = func(_, _ string) (net.Conn, error) {
return net.DialTimeout(proto, addr, defaultTimeout)
dialer := &net.Dialer{
Timeout: defaultTimeout,
}
tr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
return dialer.DialContext(ctx, proto, addr)
}
return nil
}