network: fix NPE in logging

This commit is contained in:
Evgenii Stratonikov 2020-01-13 15:02:58 +03:00
parent 565c1940e3
commit f3921ea3bd

View file

@ -88,7 +88,7 @@ func (t *TCPTransport) handleConn(conn net.Conn) {
r := io.NewBinReaderFromIO(p.conn) r := io.NewBinReaderFromIO(p.conn)
for { for {
msg := &Message{} msg := &Message{}
err := msg.Decode(r) err = msg.Decode(r)
if err == payload.ErrTooManyHeaders { if err == payload.ErrTooManyHeaders {
t.log.Warn("not all headers were processed") t.log.Warn("not all headers were processed")