This commit is contained in:
xmdhs
2023-05-24 13:12:30 +08:00
parent 764c1c7e75
commit 68f64e1a45
2 changed files with 6 additions and 3 deletions

5
build-android.bat Normal file
View File

@@ -0,0 +1,5 @@
SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=arm
SET GOARM=7
go build -trimpath -ldflags "-w -s" -tags="androidgodns"

View File

@@ -60,14 +60,12 @@ func keepalive(ctx context.Context, port uint16, log func(error)) {
defer time.Sleep(10 * time.Second)
rep, err := c.Do(reqs)
if rep != nil {
defer rep.Body.Close()
}
if err != nil {
c.CloseIdleConnections()
log(err)
return
}
defer rep.Body.Close()
}()
}
}