]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Wrap error with %w in mainReadLoop v1.32.0
authorMatt Joiner <anacrolix@gmail.com>
Thu, 30 Sep 2021 02:01:56 +0000 (12:01 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 30 Sep 2021 02:01:56 +0000 (12:01 +1000)
peerconn.go

index 03749e0ef21ccbb782ed55a6b72561774c84874b..6851d1d602b62b887449121e570529826006f728 100644 (file)
@@ -1107,7 +1107,7 @@ func (c *PeerConn) mainReadLoop() (err error) {
                                t.chunkPool.Put(&msg.Piece)
                        }
                        if err != nil {
-                               err = fmt.Errorf("receiving chunk: %s", err)
+                               err = fmt.Errorf("receiving chunk: %w", err)
                        }
                case pp.Cancel:
                        req := newRequestFromMessage(&msg)