change buttons layout (so it looks ok on mobile) and catch "broken pipe" in sc.DoWithRetry

This commit is contained in:
Laptop
2024-11-22 23:33:13 +02:00
parent a604174c12
commit 0e8244b3cc
4 changed files with 19 additions and 14 deletions

View File

@@ -7,6 +7,7 @@ import (
"net/url"
"os"
"regexp"
"syscall"
"time"
"github.com/maid-zone/soundcloak/lib/cfg"
@@ -124,7 +125,7 @@ func DoWithRetry(httpc *fasthttp.HostClient, req *fasthttp.Request, resp *fastht
return nil
}
if !os.IsTimeout(err) && err != fasthttp.ErrTimeout && err != fasthttp.ErrConnectionClosed {
if err != fasthttp.ErrTimeout && err != fasthttp.ErrConnectionClosed && !os.IsTimeout(err) && !errors.Is(err, syscall.EPIPE) { // EPIPE is "broken pipe" error
return
}
}