aboutsummaryrefslogtreecommitdiff
path: root/ldapserver/client.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-09-16 13:47:09 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-09-16 13:47:09 +0200
commit2a844bd5590fc58a9f68346eaa0554e9df4625f1 (patch)
treec1e464af256d060d2e805698d5b4ec1469c07bdc /ldapserver/client.go
parent2707dd77c5b479cd4abb1d0e69488631a3d89e19 (diff)
downloadbottin-2a844bd5590fc58a9f68346eaa0554e9df4625f1.tar.gz
bottin-2a844bd5590fc58a9f68346eaa0554e9df4625f1.zip
Encoding errors must be logged
Diffstat (limited to 'ldapserver/client.go')
-rw-r--r--ldapserver/client.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/ldapserver/client.go b/ldapserver/client.go
index c9a6f2c..339ae98 100644
--- a/ldapserver/client.go
+++ b/ldapserver/client.go
@@ -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)