Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue #19296 Make extra pgWorker option is accessible.

  • Loading branch information...
commit 928d05b6d4d52d2c8d03f4912e01c8e5a30923c2 1 parent 23a3f30
@bendiy authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 node-datasource/lib/ext/datasource.js
View
4 node-datasource/lib/ext/datasource.js
@@ -21,7 +21,7 @@ white:true*/
X.addCleanupTask(_.bind(this.cleanup, this), this);
X.pg.defaults.poolSize = this.poolSize;
- if (X.options.datasource.pgWorker) {
+ if (X.options && X.options.datasource && X.options.datasource.pgWorker) {
// Single worker version.
this.worker = require('child_process').fork(__dirname + '/pgworker.js');
this.worker.on('message', function (m) {
@@ -80,7 +80,7 @@ white:true*/
query: function (query, options, callback) {
var str = this.conString(_.clone(options));
- if (X.options.datasource.pgWorker) {
+ if (X.options && X.options.datasource && X.options.datasource.pgWorker) {
this.requestNum += 1;
this.callbacks[this.requestNum] = callback;
Please sign in to comment.
Something went wrong with that request. Please try again.