@@ -63,9 +63,9 @@ p.connect = function(callback) {
63
63
} ) ;
64
64
65
65
con . once ( 'backendKeyData' , function ( msg ) {
66
- self . processID = msg . processID ;
67
- self . secretKey = msg . secretKey ;
68
- } ) ;
66
+ self . processID = msg . processID ;
67
+ self . secretKey = msg . secretKey ;
68
+ } ) ;
69
69
70
70
//hook up query handling events to connection
71
71
//after the connection initially becomes ready for queries
@@ -139,22 +139,22 @@ p.connect = function(callback) {
139
139
} ;
140
140
141
141
p . cancel = function ( client , query ) {
142
- if ( client . activeQuery == query ) {
143
- var con = this . connection ;
144
-
145
- if ( this . host && this . host . indexOf ( '/' ) === 0 ) {
146
- con . connect ( this . host + '/.s.PGSQL.' + this . port ) ;
147
- } else {
148
- con . connect ( this . port , this . host ) ;
149
- }
150
-
151
- //once connection is established send cancel message
152
- con . on ( 'connect' , function ( ) {
153
- con . cancel ( client . processID , client . secretKey ) ;
154
- } ) ;
155
- }
156
- else if ( client . queryQueue . indexOf ( query ) != - 1 )
157
- client . queryQueue . splice ( client . queryQueue . indexOf ( query ) , 1 ) ;
142
+ if ( client . activeQuery == query ) {
143
+ var con = this . connection ;
144
+
145
+ if ( this . host && this . host . indexOf ( '/' ) === 0 ) {
146
+ con . connect ( this . host + '/.s.PGSQL.' + this . port ) ;
147
+ } else {
148
+ con . connect ( this . port , this . host ) ;
149
+ }
150
+
151
+ //once connection is established send cancel message
152
+ con . on ( 'connect' , function ( ) {
153
+ con . cancel ( client . processID , client . secretKey ) ;
154
+ } ) ;
155
+ }
156
+ else if ( client . queryQueue . indexOf ( query ) != - 1 )
157
+ client . queryQueue . splice ( client . queryQueue . indexOf ( query ) , 1 ) ;
158
158
} ;
159
159
160
160
p . _pulseQueryQueue = function ( ) {
0 commit comments