Skip to content

Commit 64975db

Browse files
cpuschmagustavoluvizotto
authored andcommitted
chore: add comment to Start function to inform about possible instability when called (go-ldap#499)
1 parent c75e537 commit 64975db

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

conn.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,12 @@ func NewConn(conn net.Conn, isTLS bool) *Conn {
265265
return l
266266
}
267267

268-
// Start initializes goroutines to read responses and process messages
268+
// Start initialises goroutines to read replies and process messages.
269+
//
270+
// Deprecated: It is usually not necessary to call this function
271+
// manually. It is public for compatibility reasons and may
272+
// cause a race condition when processing messages.
273+
// See: https://github.com/go-ldap/ldap/issues/356
269274
func (l *Conn) Start() {
270275
go l.reader()
271276
go l.processMessages()

v3/conn.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,12 @@ func NewConn(conn net.Conn, isTLS bool) *Conn {
265265
return l
266266
}
267267

268-
// Start initializes goroutines to read responses and process messages
268+
// Start initialises goroutines to read replies and process messages.
269+
//
270+
// Deprecated: It is usually not necessary to call this function
271+
// manually. It is public for compatibility reasons and may
272+
// cause a race condition when processing messages.
273+
// See: https://github.com/go-ldap/ldap/issues/356
269274
func (l *Conn) Start() {
270275
go l.reader()
271276
go l.processMessages()

0 commit comments

Comments
 (0)