Skip to content

Commit 46ebd46

Browse files
committed
proxy_protocol: Fix compatibility with go-imap v1
See #783.
1 parent a90af91 commit 46ebd46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/proxy_protocol/proxy_protocol.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,12 @@ func NewListener(inner net.Listener, p *ProxyProtocol, logger log.Logger) net.Li
7272
return false, nil
7373
}
7474

75-
listener = proxyprotocol.NewDefaultListener(inner).
75+
proxyListener := proxyprotocol.NewDefaultListener(inner).
7676
WithLogger(proxyprotocol.LoggerFunc(func(format string, v ...interface{}) {
7777
logger.Debugf("proxy_protocol: "+format, v...)
7878
})).
7979
WithSourceChecker(sourceChecker)
80+
listener = &proxyListener
8081

8182
if p.tlsConfig != nil {
8283
listener = tls.NewListener(listener, p.tlsConfig)

0 commit comments

Comments
 (0)