Skip to content

Commit fcf9eb7

Browse files
committed
sockets: defaultTimeout is unused on Windows (deadcode)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 370f202 commit fcf9eb7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sockets/sockets.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ package sockets
44
import (
55
"errors"
66
"net/http"
7-
"time"
87
)
98

10-
const defaultTimeout = 10 * time.Second
11-
129
// ErrProtocolNotAvailable is returned when a given transport protocol is not provided by the operating system.
1310
var ErrProtocolNotAvailable = errors.New("protocol not available")
1411

sockets/sockets_unix.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import (
1111
"time"
1212
)
1313

14-
const maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path)
14+
const (
15+
defaultTimeout = 10 * time.Second
16+
maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path)
17+
)
1518

1619
func configureUnixTransport(tr *http.Transport, proto, addr string) error {
1720
if len(addr) > maxUnixSocketPathSize {

0 commit comments

Comments
 (0)