From 06d50d1ad03bcd323e48f2fe174d95ceb31b8b90 Mon Sep 17 00:00:00 2001 From: Christopher Puschmann Date: Fri, 12 Apr 2024 11:51:21 +0200 Subject: [PATCH] Revert #499: Mark public Start function as deprecated (#508) * Revert "chore: add comment to `Start` function to inform about possible instability when called (#499)" This reverts commit f09ee91fc0c33a20ff2812663ce058cc329ba396. * chore: add warning to `Start` comment to inform about possible race conditions --- conn.go | 5 ++--- v3/conn.go | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/conn.go b/conn.go index 9ac538e1..bf5b07a0 100644 --- a/conn.go +++ b/conn.go @@ -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() diff --git a/v3/conn.go b/v3/conn.go index a0df79b1..05febbca 100644 --- a/v3/conn.go +++ b/v3/conn.go @@ -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()