]> Sergey Matveev's repositories - btrtrc.git/commitdiff
cmd/torrent: Fix panic with IPv6 public IP
authorMatt Joiner <anacrolix@gmail.com>
Mon, 11 Apr 2022 04:00:06 +0000 (14:00 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 11 Apr 2022 04:00:06 +0000 (14:00 +1000)
cmd/torrent/download.go

index 123b3659a483c54ee69def1d3b530e5f66abda1d..6df12216b14d7f961221da2e9090d85a71b49e05 100644 (file)
@@ -287,7 +287,7 @@ func downloadErr(flags downloadFlags) error {
        clientConfig.NoDHT = !flags.Dht
        clientConfig.Debug = flags.Debug
        clientConfig.Seed = flags.Seed
-       clientConfig.PublicIp4 = flags.PublicIP
+       clientConfig.PublicIp4 = flags.PublicIP.To4()
        clientConfig.PublicIp6 = flags.PublicIP
        clientConfig.DisablePEX = !flags.Pex
        clientConfig.DisableWebtorrent = !flags.Webtorrent