Fix nil pointer in error handling

This commit is contained in:
Zoltán Papp
2024-10-08 12:04:57 +02:00
parent 20815c9f90
commit b04d19bb0a

View File

@@ -47,7 +47,6 @@ func (p *WGUserSpaceProxy) AddTurnConn(ctx context.Context, remoteConn net.Conn)
localConn, err := dialer.DialContext(ctx, "udp", fmt.Sprintf(":%d", p.localWGListenPort))
if err != nil {
log.Errorf("failed dialing to local Wireguard port %s", err)
p.cancel()
return err
}