Skip to content

Commit 743bc4c

Browse files
committed
Update index.js
1 parent a648599 commit 743bc4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ PG.prototype.connect = function(config, callback) {
4848
var client = new this.Client(config);
4949
// Max connections waiting to connect
5050
this.num_connections++;
51+
var _this = this;
5152
client.connect(function(err) {
52-
this.num_connections--;
53+
_this.num_connections--;
5354
if(err) {
5455
return callback && callback(err);
5556
}

0 commit comments

Comments
 (0)