diff --git a/listen.go b/listen.go index 29015c10..3840cc14 100644 --- a/listen.go +++ b/listen.go @@ -3,7 +3,7 @@ package torrent import "strings" func LoopbackListenHost(network string) string { - if strings.Contains(network, "4") { + if strings.IndexByte(network, '4') != -1 { return "127.0.0.1" } else { return "::1"