Skip to content

Commit

Permalink
fix bug in get connections (#21)
Browse files Browse the repository at this point in the history
* fix bug in get connections
  • Loading branch information
DinaYakovlev authored and idanto committed Jan 24, 2019
1 parent f35e6f7 commit c1c2331
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/express-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ExpressMiddleware {
help: 'Number of open connections to the Express.js server'
});
if (this.setupOptions.server) {
setInterval(this._getConnections, timeout).unref();
setInterval(this._getConnections.bind(this), timeout).unref();
}
}
_getConnections() {
Expand Down
2 changes: 1 addition & 1 deletion src/koa-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class KoaMiddleware {
help: 'Number of open connections to the Koa.js server'
});
if (this.setupOptions.server) {
setInterval(this._getConnections, timeout).unref();
setInterval(this._getConnections.bind(this), timeout).unref();
}
}
_getConnections() {
Expand Down

0 comments on commit c1c2331

Please sign in to comment.