From f3921ea3bd5b8ed446abe6d99058bd9fba9cd038 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 13 Jan 2020 15:02:58 +0300 Subject: [PATCH] network: fix NPE in logging --- pkg/network/tcp_transport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/network/tcp_transport.go b/pkg/network/tcp_transport.go index 2055529d6..9739efc9b 100644 --- a/pkg/network/tcp_transport.go +++ b/pkg/network/tcp_transport.go @@ -88,7 +88,7 @@ func (t *TCPTransport) handleConn(conn net.Conn) { r := io.NewBinReaderFromIO(p.conn) for { msg := &Message{} - err := msg.Decode(r) + err = msg.Decode(r) if err == payload.ErrTooManyHeaders { t.log.Warn("not all headers were processed")