Skip to content

Connection.Start is deprecated without alternative #507

Closed
@dornimaug

Description

@dornimaug

As discussed in #356 and implemented in #499 the Connection.Start function has been deprecated, but there is now no way to use net.DialContext instead of one of the ldap.Dial-functions. We currently initialize connections this way:

	dialer := tls.Dialer{
		...
	}
	netConn, err := dialer.DialContext(ctx, "tcp", server)
	if err != nil {
		...
	}
	c := ldap.NewConn(netConn, true)
	c.SetTimeout(readTimeout)
	c.Start()

How can the same (using DialContext and setting a timeout) be achieved through non-deprecated APIs of the ldap package?

Should ldap.NewConn not have been deprecated alongside Connection.Start or is there any legitimate way left to use it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions