~fnux/yggdrasil-go-coap

e042d7baf5169b5c24e7261d57260a87506cb2db — Jozef Kralik 2 years ago 1958954
fix sending message when peerMaxMessageSize is not set
1 files changed, 1 insertions(+), 1 deletions(-)

M networksession.go
M networksession.go => networksession.go +1 -1
@@ 429,7 429,7 @@ func (s *sessionTCP) validateMessageSize(msg Message) error {
		return err
	}

	if uint32(size) > s.peerMaxMessageSize {
	if s.peerMaxMessageSize != 0 && uint32(size) > s.peerMaxMessageSize {
		return ErrMaxMessageSizeLimitExceeded
	}