File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
lib/internal/Magento/Framework/DB/Adapter/Pdo Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -571,14 +571,6 @@ protected function _query($sql, $bind = [])
571571 $ triesCount ++;
572572 $ this ->closeConnection ();
573573
574- /**
575- * _connect() function does not allow port parameter, so put the port back with the host
576- */
577- if (!empty ($ this ->_config ['port ' ])) {
578- $ this ->_config ['host ' ] = implode (': ' , [$ this ->_config ['host ' ], $ this ->_config ['port ' ]]);
579- unset($ this ->_config ['port ' ]);
580- }
581-
582574 $ this ->_connect ();
583575 }
584576
@@ -4034,4 +4026,19 @@ public function getSchemaListener()
40344026 }
40354027 return $ this ->schemaListener ;
40364028 }
4029+
4030+ /**
4031+ * Closes the connection.
4032+ */
4033+ public function closeConnection ()
4034+ {
4035+ /**
4036+ * _connect() function does not allow port parameter, so put the port back with the host
4037+ */
4038+ if (!empty ($ this ->_config ['port ' ])) {
4039+ $ this ->_config ['host ' ] = implode (': ' , [$ this ->_config ['host ' ], $ this ->_config ['port ' ]]);
4040+ unset($ this ->_config ['port ' ]);
4041+ }
4042+ parent ::closeConnection ();
4043+ }
40374044}
You can’t perform that action at this time.
0 commit comments