Merge pull request #594 from nspcc-dev/fix/npe

network: fix NPE in logging, closes #593.
This commit is contained in:
Roman Khimov 2020-01-13 15:13:33 +03:00 committed by GitHub
commit f796749658
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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")