diff --git a/azhealthcheck.go b/azhealthcheck.go index 360871d..4963d7f 100644 --- a/azhealthcheck.go +++ b/azhealthcheck.go @@ -202,8 +202,7 @@ fmt.Println(out.String()) netTransport = &http.Transport{ Dial: (&net.Dialer{ Timeout: 10 * time.Second, - DisableKeepAlives: true, - //KeepAlive: 10 * time.Second, + KeepAlive: 1 * time.Second, }).Dial, TLSClientConfig: tlsConfig, // used for the client ssl cert auth TLSHandshakeTimeout: 10 * time.Second, @@ -216,8 +215,7 @@ fmt.Println(out.String()) netTransport = &http.Transport{ Dial: (&net.Dialer{ Timeout: 10 * time.Second, - DisableKeepAlives: true, - //KeepAlive: 10 * time.Second, + KeepAlive: 1 * time.Second, }).Dial, TLSHandshakeTimeout: 10 * time.Second, ResponseHeaderTimeout: 10 * time.Second, diff --git a/build.sh b/build.sh index 19b99d0..0512a5a 100755 --- a/build.sh +++ b/build.sh @@ -9,7 +9,7 @@ else fi -TARGET_OPERATING_SYSTEMS="darwin linux" # windows +TARGET_OPERATING_SYSTEMS="darwin linux windows" TARGET_PLATFORMS="amd64" # i386 for GOOS in $TARGET_OPERATING_SYSTEMS; do @@ -17,7 +17,11 @@ for GOOS in $TARGET_OPERATING_SYSTEMS; do echo "Building $GOOS-$GOARCH" export GOOS=$GOOS export GOARCH=$GOARCH - go build -o target/${TARGET_FILENAME}-$GOOS-$GOARCH ${TARGET_FILENAME}.go + FINAL_FILENAME="target/${TARGET_FILENAME}-$GOOS-$GOARCH" + if [ $GOOS == "windows" ]; then + FINAL_FILENAME="${FINAL_FILENAME}.exe" + fi + go build -o $FINAL_FILENAME ${TARGET_FILENAME}.go done done