]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Since IPv6 blocklists aren't prevalent, default to using IPv4 in client for now
authorMatt Joiner <anacrolix@gmail.com>
Sat, 7 Mar 2015 06:11:02 +0000 (17:11 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 7 Mar 2015 06:11:02 +0000 (17:11 +1100)
client.go

index eddfcff8133b64655fcadb16dc1fa411ffe27f3a..8eeb5ad4ef55caeb5b6386cbf7937198e635b8c3 100644 (file)
--- a/client.go
+++ b/client.go
@@ -499,7 +499,9 @@ func NewClient(cfg *Config) (cl *Client, err error) {
                        return addr.String()
                }
                if cfg.ListenAddr == "" {
-                       return ":50007"
+                       // IPv6 isn't well supported with blocklists, or with trackers and
+                       // DHT.
+                       return "0.0.0.0:50007"
                }
                return cfg.ListenAddr
        }
@@ -1728,6 +1730,7 @@ func (f File) Path() string {
        return f.path
 }
 
+// A file-like handle to some torrent data resource.
 type Handle interface {
        io.Reader
        io.Seeker