rethinkdbdash
Advanced tools
Comparing version 2.1.9 to 2.1.10
@@ -108,4 +108,4 @@ var net = require('net'); | ||
// We can just abort the whole thing | ||
// TODO dig in node's code to see if it can actually happen, errors are probably just emitted. | ||
self.connection.emit('error', err); | ||
self.open = false; | ||
reject(new Err.ReqlDriverError('Failed to perform handshake with '+self.host+':'+self.port)); | ||
}); | ||
@@ -112,0 +112,0 @@ }); |
{ | ||
"name": "rethinkdbdash", | ||
"version": "2.1.9", | ||
"version": "2.1.10", | ||
"description": "A Node.js driver for RethinkDB with promises and a connection pool", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -308,2 +308,21 @@ rethinkdbdash | ||
The pool master emits the `healthy` when its state change. Its state is defined as: | ||
- healthy when at least one pool is healthy: Queries can be immediately executed or will be queued. | ||
- not healthy when no pool is healthy: Queries will immediately fail. | ||
A pool being healthy is it has at least one available connection, or it was just | ||
created and opening a connection hasn't failed. | ||
```js | ||
r.getPoolMaster().on('healthy', function(healthy) { | ||
if (healthy === true) { | ||
console.log('We can run queries.'); | ||
} | ||
else { | ||
console.log('No queries can be run.'); | ||
} | ||
}); | ||
``` | ||
##### Note about connections | ||
@@ -310,0 +329,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
821860
544