From c3301c36d8292d5be7dd35215878c9b521c26fde Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Thu, 13 Jun 2024 17:17:07 +0200 Subject: [PATCH] These two too Signed-off-by: Miek Gieben --- server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.go b/server.go index 2f7655645..81580d1e5 100644 --- a/server.go +++ b/server.go @@ -188,11 +188,11 @@ type DecorateReader func(Reader) Reader // Implementations should never return a nil Writer. type DecorateWriter func(Writer) Writer -// InvalidMsgFunc is a listener hook for observing incoming messages that were discarded +// MsgInvalidFunc is a listener hook for observing incoming messages that were discarded // because they could not be parsed. // Every message that is read by a Reader will eventually be provided to the Handler, // rejected (or ignored) by the MsgAcceptFunc, or passed to this function. -type InvalidMsgFunc func(m []byte, err error) +type MsgInvalidFunc func(m []byte, err error) func DefaultMsgInvalidFunc(m []byte, err error) {} @@ -242,7 +242,7 @@ type Server struct { // By default DefaultMsgAcceptFunc will be used. MsgAcceptFunc MsgAcceptFunc // MsgInvalidFunc is optional, will be called if a message is received but cannot be parsed. - MsgInvalidFunc InvalidMsgFunc + MsgInvalidFunc MsgInvalidFunc // Shutdown handling lock sync.RWMutex