Simple string sort on listing torrents

This commit is contained in:
Ben Sarmiento
2023-12-12 00:38:17 +01:00
parent ed903c8943
commit 2a1bc59300
6 changed files with 26 additions and 28 deletions

View File

@@ -68,7 +68,10 @@ func NewHTTPClient(token string, maxRetries int, timeoutSecs int, cfg config.Con
if cfg.ShouldForceIPv6() {
dialer := &net.Dialer{}
dialContext := func(ctx context.Context, network, address string) (net.Conn, error) {
host, port, _ := net.SplitHostPort(address)
host, port, err := net.SplitHostPort(address)
if err != nil {
return nil, err
}
if ipv6Address, ok := client.ipv6.Get(address); ok {
return dialer.DialContext(ctx, network, ipv6Address)
}