]> Sergey Matveev's repositories - btrtrc.git/commitdiff
A few tweaks
authorMatt Joiner <anacrolix@gmail.com>
Sat, 29 Nov 2014 01:42:18 +0000 (19:42 -0600)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 29 Nov 2014 01:42:18 +0000 (19:42 -0600)
client.go

index 7336b62322537df743ed650f843d50dcfebbf387..2da4d5b479fc09cfe27ae8a34be0ea0774182e59 100644 (file)
--- a/client.go
+++ b/client.go
@@ -977,7 +977,7 @@ func addrPort(addr net.Addr) int {
 // and exit.
 func (me *Client) connectionLoop(t *torrent, c *connection) error {
        decoder := pp.Decoder{
-               R:         bufio.NewReaderSize(c.Socket, 20*1024),
+               R:         bufio.NewReader(c.Socket),
                MaxLength: 256 * 1024,
        }
        for {
@@ -1542,7 +1542,7 @@ func (cl *Client) waitWantPeers(t *torrent) bool {
 
 func (cl *Client) announceTorrentDHT(t *torrent, impliedPort bool) {
        for cl.waitWantPeers(t) {
-               log.Printf("announcing torrent %q to DHT", t)
+               log.Printf("getting peers for %q from DHT", t)
                ps, err := cl.dHT.GetPeers(string(t.InfoHash[:]))
                if err != nil {
                        log.Printf("error getting peers from dht: %s", err)