Sync reuseport sub-package to latest version

This commit is contained in:
Kleissner
2021-10-11 01:38:13 +02:00
parent fbeb01e7ff
commit 956e6dd76b
6 changed files with 5 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# reuseport
This is a fork from `https://github.com/libp2p/go-reuseport`. Last sync of changes: 16.03.2021
This is a fork from `https://github.com/libp2p/go-reuseport`. Last sync of changes: 11.10.2021
**NOTE:** This package REQUIRES go >= 1.11.

View File

@@ -1,3 +1,4 @@
//go:build !plan9 && !windows && !wasm
// +build !plan9,!windows,!wasm
package reuseport

View File

@@ -1,3 +1,4 @@
//go:build wasm
// +build wasm
package reuseport

View File

@@ -19,9 +19,8 @@ package reuseport
import (
"context"
"fmt"
"net"
"github.com/pkg/errors"
)
// Available returns whether or not SO_REUSEPORT or equivalent behaviour is
@@ -54,7 +53,7 @@ func ListenPacket(network, address string) (net.PacketConn, error) {
func Dial(network, laddr, raddr string) (net.Conn, error) {
nla, err := ResolveAddr(network, laddr)
if err != nil {
return nil, errors.Wrap(err, "resolving local addr")
return nil, fmt.Errorf("failed to resolve local addr: %w", err)
}
d := net.Dialer{
Control: Control,