diff --git a/conn.go b/conn.go index 85b7cd1..9ac538e 100644 --- a/conn.go +++ b/conn.go @@ -265,7 +265,12 @@ func NewConn(conn net.Conn, isTLS bool) *Conn { return l } -// Start initializes goroutines to read responses and process messages +// Start initialises goroutines to read replies and process messages. +// +// Deprecated: It is usually not necessary to call this function +// manually. It is public for compatibility reasons and may +// cause a race condition when processing messages. +// See: https://github.com/go-ldap/ldap/issues/356 func (l *Conn) Start() { go l.reader() go l.processMessages() diff --git a/v3/conn.go b/v3/conn.go index 4824b2d..a0df79b 100644 --- a/v3/conn.go +++ b/v3/conn.go @@ -265,7 +265,12 @@ func NewConn(conn net.Conn, isTLS bool) *Conn { return l } -// Start initializes goroutines to read responses and process messages +// Start initialises goroutines to read replies and process messages. +// +// Deprecated: It is usually not necessary to call this function +// manually. It is public for compatibility reasons and may +// cause a race condition when processing messages. +// See: https://github.com/go-ldap/ldap/issues/356 func (l *Conn) Start() { go l.reader() go l.processMessages()