Skip to content

Commit

Permalink
fixup! use datasource constant
Browse files Browse the repository at this point in the history
  • Loading branch information
nabdelgadir committed Aug 7, 2019
1 parent b14875d commit 487957a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/datasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ DataSource.prototype._setupConnector = function() {
const dataSource = this;

// Set max listeners to a default/configured value
const maxOfflineRequests = dataSource.getMaxOfflineRequests();
dataSource.setMaxListeners(maxOfflineRequests);
dataSource.setMaxListeners(dataSource.getMaxOfflineRequests());

this.connector.log = function(query, start) {
dataSource.log(query, start);
Expand Down Expand Up @@ -2717,7 +2716,7 @@ DataSource.prototype.getMaxOfflineRequests = function() {
// Override this default value with a datasource setting
// 'maxOfflineRequests' from an application's datasources.json

let maxOfflineRequests = this.juggler.DataSource.DEFAULT_MAX_OFFLINE_REQUESTS;
let maxOfflineRequests = DataSource.DEFAULT_MAX_OFFLINE_REQUESTS;
if (
this.settings &&
this.settings.maxOfflineRequests
Expand Down

0 comments on commit 487957a

Please sign in to comment.