Skip to content

Commit

Permalink
These two too
Browse files Browse the repository at this point in the history
Signed-off-by: Miek Gieben <[email protected]>
  • Loading branch information
miekg committed Jun 13, 2024
1 parent eada9c9 commit c3301c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c3301c3

Please sign in to comment.