]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix logging fmt error
authorMatt Joiner <anacrolix@gmail.com>
Mon, 26 May 2025 14:28:29 +0000 (00:28 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 26 May 2025 14:28:29 +0000 (00:28 +1000)
peerconn.go

index 40450dcb87e26007dc71b66df6bed97d08b57ff7..6c643f83400514981fe43fcf6f093019e6624b1c 100644 (file)
@@ -612,7 +612,8 @@ func (c *PeerConn) onReadRequest(r Request, startFetch bool) error {
        }
        if opt := c.maximumPeerRequestChunkLength(); opt.Ok && int(r.Length) > opt.Value {
                err := fmt.Errorf("peer requested chunk too long (%v)", r.Length)
-               c.protocolLogger.Levelf(log.Warning, err.Error())
+               // Brother ewwww...
+               c.protocolLogger.Levelf(log.Warning, "%v", err.Error())
                if c.fastEnabled() {
                        c.reject(r)
                        return nil