From a89d9c498ce4e1f0955358f7ec8ea525cca1c118 Mon Sep 17 00:00:00 2001 From: mikhaillav Date: Wed, 8 Nov 2023 00:28:48 +0300 Subject: [PATCH] Revert "remove error message" This reverts commit ea6febbedccc185f516b8d993fc7f479d136a7ce. --- listener.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/listener.go b/listener.go index 3abbbcb..bcc2f5e 100644 --- a/listener.go +++ b/listener.go @@ -161,7 +161,9 @@ func (listener *Listener) listen() { // Technically we should not re-use the same byte slice after its ownership has been taken by the // buffer, but we can do this anyway because we copy the data later. - listener.handle(buf, addr) + if err := listener.handle(buf, addr); err != nil { + listener.log.Printf("listener: error handling packet (addr = %v): %v\n", addr, err) + } buf.Reset() } }