mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-02 21:36:10 +00:00
Merge branch 'master' into marko/int64-
This commit is contained in:
@@ -118,12 +118,12 @@ func New(remote, wsEndpoint string) (*HTTP, error) {
|
||||
|
||||
// NewWithTimeout does the same thing as New, except you can set a Timeout for
|
||||
// http.Client. A Timeout of zero means no timeout.
|
||||
func NewWithTimeout(remote, wsEndpoint string, timeout uint) (*HTTP, error) {
|
||||
func NewWithTimeout(remote, wsEndpoint string, timeout time.Duration) (*HTTP, error) {
|
||||
httpClient, err := jsonrpcclient.DefaultHTTPClient(remote)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
httpClient.Timeout = time.Duration(timeout) * time.Second
|
||||
httpClient.Timeout = timeout
|
||||
return NewWithClient(remote, wsEndpoint, httpClient)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user