From 51228a6522200ae57474ee54fd035ed72c48e818 Mon Sep 17 00:00:00 2001 From: Christopher Puschmann Date: Tue, 28 May 2024 19:20:35 +0200 Subject: [PATCH] chore: Fix desynced root and v3 directory As pointed out in https://github.com/go-ldap/ldap/issues/520#issue-2319762177, the subdirectory v3 has been out of sync. This PR copies all missing changes to the root directory. --- conn.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conn.go b/conn.go index bf5b07a..05febbc 100644 --- a/conn.go +++ b/conn.go @@ -535,9 +535,10 @@ func (l *Conn) processMessages() { l.messageContexts[message.MessageID] = message.Context // Add timeout if defined - if l.getTimeout() > 0 { + requestTimeout := l.getTimeout() + if requestTimeout > 0 { go func() { - timer := time.NewTimer(time.Duration(l.getTimeout())) + timer := time.NewTimer(time.Duration(requestTimeout)) defer func() { if err := recover(); err != nil { l.err = fmt.Errorf("ldap: recovered panic in RequestTimeout: %v", err)