Skip to content

Commit d96e12c

Browse files
committed
improve documentation
1 parent 1c03fbf commit d96e12c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

protocol.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ var (
1818
// e.g. go build -ldflags -X "github.com/pires/go-proxyproto.DefaultReadHeaderTimeout=1s"
1919
DefaultReadHeaderTimeout = 10 * time.Second
2020

21+
// ErrInvalidUpstream should be returned when an upstream connection address
22+
// is not trusted, and therefore is invalid.
2123
ErrInvalidUpstream = fmt.Errorf("proxyproto: upstream connection address not trusted for PROXY information")
2224
)
2325

@@ -64,7 +66,7 @@ func ValidateHeader(v Validator) func(*Conn) {
6466
}
6567
}
6668

67-
// Accept waits for and returns the next connection to the listener.
69+
// Accept waits for and returns the next valid connection to the listener.
6870
func (p *Listener) Accept() (net.Conn, error) {
6971
for {
7072
// Get the underlying connection

0 commit comments

Comments
 (0)