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 (go-ldap#499)
  • Loading branch information
cpuschma authored and gustavoluvizotto committed Apr 11, 2024
1 parent c75e537 commit 64975db
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 64975db

Please sign in to comment.