]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix shortened webseed request debugging condition
authorMatt Joiner <anacrolix@gmail.com>
Mon, 14 Jul 2025 12:15:34 +0000 (22:15 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 14 Jul 2025 12:15:34 +0000 (22:15 +1000)
webseed-requesting.go

index 91e3f75fc7d1d3d72d75342d4675b9d40f2766c9..a6610c8ea00aa52b2c0eb7cf455a02894cbaa7f8 100644 (file)
@@ -178,9 +178,9 @@ func (cl *Client) globalUpdateWebSeedRequests() {
                        panicif.LessThan(last, begin)
                        // Hello C++ my old friend.
                        end := last + 1
-                       if webseed.PrintDebug {
+                       if webseed.PrintDebug && end != fileEnd {
                                fmt.Printf("shortened webseed request for %v: [%v-%v) to [%v-%v)\n",
-                                       requestKey.filePath(), begin, last+1, begin, end)
+                                       requestKey.filePath(), begin, fileEnd, begin, end)
                        }
                        panicif.GreaterThan(end, fileEnd)
                        peer.spawnRequest(begin, end)