]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Back off on the kicked connections log
authorMatt Joiner <anacrolix@gmail.com>
Wed, 5 Aug 2015 22:56:36 +0000 (08:56 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 5 Aug 2015 22:56:36 +0000 (08:56 +1000)
client.go

index 2bfae3b731387d8cfac7420da062890ce69a6ee9..ac54b86affe712f3aa0ca22f76d0912822cff9c7 100644 (file)
--- a/client.go
+++ b/client.go
@@ -22,6 +22,7 @@ import (
        "strings"
        "time"
 
+       "github.com/anacrolix/missinggo"
        . "github.com/anacrolix/missinggo"
        "github.com/anacrolix/missinggo/perf"
        "github.com/anacrolix/sync"
@@ -1763,7 +1764,9 @@ func (me *Client) addConnection(t *torrent, c *connection) bool {
                if c == nil {
                        return false
                }
-               log.Printf("%s: dropping connection to make room for new one:\n    %s", t, c)
+               if missinggo.CryHeard() {
+                       log.Printf("%s: dropping connection to make room for new one:\n    %s", t, c)
+               }
                c.Close()
                me.deleteConnection(t, c)
        }