]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Don't listen on IPv6 if DisableIPv6 is set
authorMatt Joiner <anacrolix@gmail.com>
Wed, 2 May 2018 09:24:46 +0000 (19:24 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 2 May 2018 09:24:46 +0000 (19:24 +1000)
Fixes #250

client.go

index 8985e1a02f3632cdc792a038b8f960ae527405e4..a0800d58d4a5da0a26890aba71a1682f6911bd71 100644 (file)
--- a/client.go
+++ b/client.go
@@ -502,6 +502,9 @@ func peerNetworkEnabled(network string, cfg Config) bool {
        if cfg.DisableTCP && c("tcp") {
                return false
        }
+       if cfg.DisableIPv6 && c("6") {
+               return false
+       }
        return true
 }