Skip to content

Commit 19fbef2

Browse files
committed
Revert "sockets: defaultTimeout is unused on Windows (deadcode)"
This reverts commit fcf9eb7. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 85709ff commit 19fbef2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sockets/sockets.go

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

10+
const defaultTimeout = 10 * time.Second
11+
912
// ErrProtocolNotAvailable is returned when a given transport protocol is not provided by the operating system.
1013
var ErrProtocolNotAvailable = errors.New("protocol not available")
1114

sockets/sockets_unix.go

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

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

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

0 commit comments

Comments
 (0)