mirror of
https://github.com/xmdhs/natupnp.git
synced 2025-09-27 11:22:23 +08:00
fix
This commit is contained in:
5
build-android.bat
Normal file
5
build-android.bat
Normal 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"
|
@@ -60,14 +60,12 @@ func keepalive(ctx context.Context, port uint16, log func(error)) {
|
|||||||
defer time.Sleep(10 * time.Second)
|
defer time.Sleep(10 * time.Second)
|
||||||
|
|
||||||
rep, err := c.Do(reqs)
|
rep, err := c.Do(reqs)
|
||||||
if rep != nil {
|
|
||||||
defer rep.Body.Close()
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.CloseIdleConnections()
|
c.CloseIdleConnections()
|
||||||
log(err)
|
log(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer rep.Body.Close()
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user