Skip to content

Commit

Permalink
Revert #499: Mark public Start function as deprecated (#508)
Browse files Browse the repository at this point in the history
* Revert "chore: add comment to `Start` function to inform about possible instability when called (#499)"

This reverts commit f09ee91.

* chore: add warning to `Start` comment to inform about possible race conditions
  • Loading branch information
cpuschma authored Apr 12, 2024
1 parent 2260012 commit 06d50d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,9 @@ func NewConn(conn net.Conn, isTLS bool) *Conn {
}

// Start initialises goroutines to read replies and process messages.
// Warning: Calling this function in addition to Dial or DialURL
// may cause race conditions.
//
// 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()
Expand Down
5 changes: 2 additions & 3 deletions v3/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,9 @@ func NewConn(conn net.Conn, isTLS bool) *Conn {
}

// Start initialises goroutines to read replies and process messages.
// Warning: Calling this function in addition to Dial or DialURL
// may cause race conditions.
//
// 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()
Expand Down

0 comments on commit 06d50d1

Please sign in to comment.