File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ function Connection(options = {}) {
137137 }
138138
139139 function connect ( ) {
140- connect_timeout && ( connect_timer = setTimeout ( connectTimedOut , connect_timeout * 1000 ) )
140+ connect_timeout && ( clearTimeout ( connect_timer ) , connect_timer = setTimeout ( connectTimedOut , connect_timeout * 1000 ) )
141141 socket . connect ( )
142142 }
143143
@@ -176,7 +176,7 @@ function Connection(options = {}) {
176176 }
177177
178178 function onready ( err ) {
179- connect_timer && ( clearTimeout ( connect_timer ) , connect_timer = null )
179+ clearTimeout ( connect_timer )
180180 if ( err ) {
181181 if ( backend . query ) {
182182 err . stack += backend . query . origin . replace ( / .* \n / , '\n' )
@@ -226,7 +226,7 @@ function Connection(options = {}) {
226226 }
227227
228228 function close ( ) {
229- connect_timer && ( clearTimeout ( connect_timer ) , connect_timer = null )
229+ clearTimeout ( connect_timer )
230230 error ( errors . connection ( 'CONNECTION_CLOSED' , options ) )
231231 statements = { }
232232 messages = [ ]
You can’t perform that action at this time.
0 commit comments