Fix indentation

This commit is contained in:
Kenny Meyer 2012-03-22 17:32:56 -03:00
parent 734a2cbdc6
commit a25ef7cae4

View File

@ -63,9 +63,9 @@ p.connect = function(callback) {
}); });
con.once('backendKeyData', function(msg) { con.once('backendKeyData', function(msg) {
self.processID = msg.processID; self.processID = msg.processID;
self.secretKey = msg.secretKey; self.secretKey = msg.secretKey;
}); });
//hook up query handling events to connection //hook up query handling events to connection
//after the connection initially becomes ready for queries //after the connection initially becomes ready for queries
@ -139,22 +139,22 @@ p.connect = function(callback) {
}; };
p.cancel = function(client, query) { p.cancel = function(client, query) {
if (client.activeQuery == query) { if (client.activeQuery == query) {
var con = this.connection; var con = this.connection;
if(this.host && this.host.indexOf('/') === 0) { if(this.host && this.host.indexOf('/') === 0) {
con.connect(this.host + '/.s.PGSQL.' + this.port); con.connect(this.host + '/.s.PGSQL.' + this.port);
} else { } else {
con.connect(this.port, this.host); con.connect(this.port, this.host);
} }
//once connection is established send cancel message //once connection is established send cancel message
con.on('connect', function() { con.on('connect', function() {
con.cancel(client.processID, client.secretKey); con.cancel(client.processID, client.secretKey);
}); });
} }
else if (client.queryQueue.indexOf(query) != -1) else if (client.queryQueue.indexOf(query) != -1)
client.queryQueue.splice(client.queryQueue.indexOf(query), 1); client.queryQueue.splice(client.queryQueue.indexOf(query), 1);
}; };
p._pulseQueryQueue = function() { p._pulseQueryQueue = function() {