aboutsummaryrefslogtreecommitdiff
path: root/ldapserver/packet.go
diff options
context:
space:
mode:
Diffstat (limited to 'ldapserver/packet.go')
-rw-r--r--ldapserver/packet.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldapserver/packet.go b/ldapserver/packet.go
index bd0f6e5..a87035c 100644
--- a/ldapserver/packet.go
+++ b/ldapserver/packet.go
@@ -86,7 +86,8 @@ func readTagAndLength(conn *bufio.Reader, bytes *[]byte) (ret ldap.TagAndLength,
// }
// We are expecting the LDAP sequence tag 0x30 as first byte
if b != 0x30 {
- return nil, fmt.Errorf("Expecting 0x30 as first byte, but got %#x instead", b)
+ err = fmt.Errorf("Expecting 0x30 as first byte, but got %#x instead", b)
+ return
}
b, err = readBytes(conn, bytes, 1)