File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,9 @@ public function orderNodesByTimeout($orderNodesByTimeout)
132
132
}
133
133
$ timeout = $ requestTimeout = microtime (true ) - $ startMTime ;
134
134
135
- $ connection ->close ();
135
+ if ($ connection ->isConnected ()) {
136
+ $ connection ->close ();
137
+ }
136
138
$ timeouts [$ currentNodeURL ] = round ($ timeout , 4 );
137
139
} catch (ConnectionException $ e ) {
138
140
}
@@ -200,7 +202,9 @@ protected function setReserveNodeUrlToCurrentUrl()
200
202
public function connectToReserveNode ()
201
203
{
202
204
$ connection = $ this ->getConnection ();
203
- $ connection ->close ();
205
+ if ($ connection ->isConnected ()) {
206
+ $ connection ->close ();
207
+ }
204
208
$ this ->setReserveNodeUrlToCurrentUrl ();
205
209
return $ this ->newConnection ($ this ->getCurrentUrl ());
206
210
}
You can’t perform that action at this time.
0 commit comments