Permalink
Browse files

self not this

  • Loading branch information...
1 parent 6d107b9 commit a731cbe314c22932300854a8e331552f557511db @yosefd yosefd committed Mar 17, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/winston-mongodb.js
View
@@ -145,18 +145,18 @@ MongoDB.prototype.open = function (callback) {
self.pending.length = 0;
//
- // Set a timeout to close the client connection unless `this.keepAlive`
+ // Set a timeout to close the client connection unless `self.keepAlive`
// has been set to true in which case it is the responsibility of the
// programmer to close the underlying connection.
//
- if (!this.keepAlive || err) {
+ if (!self.keepAlive || err) {
setTimeout(function () {
self.state = 'unopened';
if (self._db) {
// Connection was opened.
self._db.close();
}
- }, this.timeout);
+ }, self.timeout);
}
}

0 comments on commit a731cbe

Please sign in to comment.