Skip to content

Commit

Permalink
chore: add comment to Start function to inform about possible insta…
Browse files Browse the repository at this point in the history
…bility when called (#499)
  • Loading branch information
cpuschma authored Apr 1, 2024
1 parent 450e034 commit f09ee91
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 6 additions & 1 deletion v3/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f09ee91

Please sign in to comment.