aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/_nuts/github.com/fabioberger/coinbase-go/utils.go
blob: 329e59cd3281f2a377ba89237a8b5869d36b0a5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package coinbase

import (
	"net"
	"time"
)

// dialTimeout is used to enforce a timeout for all http requests.
func dialTimeout(network, addr string) (net.Conn, error) {
	var timeout = time.Duration(2 * time.Second) //how long to wait when trying to connect to the coinbase
	return net.DialTimeout(network, addr, timeout)
}