mirror of
https://github.com/xmdhs/natupnp.git
synced 2025-09-26 19:11:11 +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)
|
||||
|
||||
rep, err := c.Do(reqs)
|
||||
if rep != nil {
|
||||
defer rep.Body.Close()
|
||||
}
|
||||
if err != nil {
|
||||
c.CloseIdleConnections()
|
||||
log(err)
|
||||
return
|
||||
}
|
||||
defer rep.Body.Close()
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user