Merge branch 'master' into marko/int64-

This commit is contained in:
Marko
2021-02-01 16:54:32 +00:00
committed by GitHub
10 changed files with 79 additions and 117 deletions
+2 -2
View File
@@ -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)
}