Encoding errors must be logged

This commit is contained in:
Quentin 2021-09-16 13:47:09 +02:00
parent 2707dd77c5
commit 2a844bd559
Signed by: quentin
GPG key ID: A98E9B769E4FF428

View file

@ -206,7 +206,10 @@ func (c *client) close() {
}
func (c *client) writeMessage(m *ldap.LDAPMessage) {
data, _ := m.Write()
data, err := m.Write()
if err != nil {
Logger.Errorf("bottin: unable to marshal response message: %v", err)
}
//Logger.Printf(">>> %d - %s - hex=%x", c.Numero, m.ProtocolOpName(), data.Bytes())
Logger.Tracef(">>> [%d] %#v", c.Numero, m)