Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Adds IdleConnTimeout to transport in client #1355

Merged
merged 1 commit into from
Nov 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
sudo: false
language: go
go:
- 1.6.3
- 1.7.1
- 1.7.3
before_install:
- bash scripts/gitcookie.sh
- go get github.com/smartystreets/goconvey/convey
Expand All @@ -16,10 +15,6 @@ env:
- SNAP_TEST_TYPE=small
- SNAP_TEST_TYPE=medium
- SNAP_TEST_TYPE=build
matrix:
exclude:
- go: 1.6.3
env: SNAP_TEST_TYPE=build
install:
- export TMPDIR=$HOME/tmp
- mkdir -p $TMPDIR
Expand Down Expand Up @@ -48,7 +43,7 @@ deploy:
on:
repo: intelsdi-x/snap
branch: master
condition: $SNAP_TEST_TYPE = build && $TRAVIS_GO_VERSION = "1.7.1"
condition: $SNAP_TEST_TYPE = build && $TRAVIS_GO_VERSION = "1.7.3"
- provider: s3
access_key_id: AKIAINMB43VSSPFZISAA
secret_access_key:
Expand All @@ -62,4 +57,4 @@ deploy:
on:
repo: intelsdi-x/snap
tags: true
condition: $SNAP_TEST_TYPE = build && $TRAVIS_GO_VERSION = "1.7.1"
condition: $SNAP_TEST_TYPE = build && $TRAVIS_GO_VERSION = "1.7.3"
3 changes: 3 additions & 0 deletions mgmt/rest/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"os"
"path/filepath"
"strings"
"time"

"github.com/asaskevich/govalidator"

Expand Down Expand Up @@ -104,9 +105,11 @@ func Username(u string) metaOp {
var (
secureTransport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: false},
IdleConnTimeout: time.Second,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you like to make this option configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. What scenario do you see where it would be beneficial for a user to configure this?

}
insecureTransport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
IdleConnTimeout: time.Second,
}
)

Expand Down