Skip to content

Commit

Permalink
sockets: defaultTimeout is unused on Windows (deadcode)
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Jul 22, 2021
1 parent 370f202 commit fcf9eb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions sockets/sockets.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ package sockets
import (
"errors"
"net/http"
"time"
)

const defaultTimeout = 10 * time.Second

// ErrProtocolNotAvailable is returned when a given transport protocol is not provided by the operating system.
var ErrProtocolNotAvailable = errors.New("protocol not available")

Expand Down
5 changes: 4 additions & 1 deletion sockets/sockets_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,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 {
Expand Down

0 comments on commit fcf9eb7

Please sign in to comment.