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