Unable to connect when `TimeOut` is specified
GaikwadPratik opened this issue · comments
Gaikwad Pratik commented
Describe the bug
I have connectOpts defined as
connectOpts := r.ConnectOpts{
Timeout: 5000,
Address: "localhost",
Database: fabricContext.Config.DbName,
Password: pass,
InitialCap: 20,
MaxOpen: 20}
I get the following error:
error="rethinkdb: dial tcp: i/o timeout"
However if I remove Timeout
from above, then it works. Is the Timeout supposed to be in nanosecond
? Because Timeout: 1 * 1000 * 1000,
also works. In that case, can you please update comment/documentation?
System info
- OS: Ubuntu 18.04
- RethinkDB Version: rethinkdb 2.3.6+14+g9ca0d3+dirty~0 (CLANG 6.0.0 (tags/RELEASE_600/final))
- driver: gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1
Gerrit commented
It's a time.Duration and it is indicated by the variable type already:
Line 46 in 3d6444f
5 * time.Second
or something like that.