Permalink
Browse files

Merge remote branch 'kennym/patch-4'

  • Loading branch information...
brianc committed Mar 27, 2012
2 parents be5308a + a25ef7c commit 1c6afce19fff6144321703b1db53e514709d474d
Showing with 19 additions and 19 deletions.
  1. +19 −19 lib/client.js
View
@@ -63,9 +63,9 @@ p.connect = function(callback) {
});
con.once('backendKeyData', function(msg) {
- self.processID = msg.processID;
- self.secretKey = msg.secretKey;
- });
+ self.processID = msg.processID;
+ self.secretKey = msg.secretKey;
+ });
//hook up query handling events to connection
//after the connection initially becomes ready for queries
@@ -139,22 +139,22 @@ p.connect = function(callback) {
};
p.cancel = function(client, query) {
- if (client.activeQuery == query) {
- var con = this.connection;
-
- if(this.host && this.host.indexOf('/') === 0) {
- con.connect(this.host + '/.s.PGSQL.' + this.port);
- } else {
- con.connect(this.port, this.host);
- }
-
- //once connection is established send cancel message
- con.on('connect', function() {
- con.cancel(client.processID, client.secretKey);
- });
- }
- else if (client.queryQueue.indexOf(query) != -1)
- client.queryQueue.splice(client.queryQueue.indexOf(query), 1);
+ if (client.activeQuery == query) {
+ var con = this.connection;
+
+ if(this.host && this.host.indexOf('/') === 0) {
+ con.connect(this.host + '/.s.PGSQL.' + this.port);
+ } else {
+ con.connect(this.port, this.host);
+ }
+
+ //once connection is established send cancel message
+ con.on('connect', function() {
+ con.cancel(client.processID, client.secretKey);
+ });
+ }
+ else if (client.queryQueue.indexOf(query) != -1)
+ client.queryQueue.splice(client.queryQueue.indexOf(query), 1);
};
p._pulseQueryQueue = function() {

0 comments on commit 1c6afce

Please sign in to comment.