Closed lirantal closed 7 years ago
r.connect
just returns a connection, there's no pool involved.
If you have a pool, it's because you initialized the driver with pool: true
(which is also the default value)
@neumino if you debug the connection that gets created when you pass pool: true
you'll see that there's also a connection initialized for the 'single server' address
What is the expected behavior when one does
r.connect()
with regards to server/port configuration?If a single instance of host/port is provided such as:
Then
r.connect()
connects but also seems to initialize a connection pool based on these settings. So far so good.However, if
r.connect()
is served with the expected servers pool object that rethinkdbdash uses such as:Then the 1st connection is initialized with defaults (localhost, 28015) because no host/port are provided, yet the rest of the connection pool initializes correctly.
While that's probably not much of a bug by itself it appears as an inconsistent behavior which causes confusion with regards to the options object provided and the usage of
r.connect()
.