Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixing an issue in Client.prototype._ping where self is used instead of this #3

Merged
merged 1 commit into from

2 participants

@gerred

The offending change was causing exceptions when the client was pinged, because self is undefined in the context. No reason not to use this, so changed it.

@gerred gerred Changing Client.prototype._ping to use this instead of self. Self was…
…n't defined in the context of that prototype method, causing the ping query to fail and throw an exception.
d6b2f30
@mscdex mscdex merged commit a417006 into mscdex:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 10, 2012
  1. @gerred

    Changing Client.prototype._ping to use this instead of self. Self was…

    gerred authored
    …n't defined in the context of that prototype method, causing the ping query to fail and throw an exception.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Client.js
View
2  lib/Client.js
@@ -256,7 +256,7 @@ Client.prototype.prepare = function(query) {
}
Client.prototype._ping = function() {
- self.query('DO 0', true, true);
+ this.query('DO 0', true, true);
this._pinger = setTimeout(this._ping, this.pingInterval);
};
Something went wrong with that request. Please try again.