File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -146,12 +146,18 @@ public function close(): bool
146146
147147    public  function  release (): void 
148148    {
149-         if  ($ this database  && $ this database  != $ this config ['db ' ]) {
150-             // Select the origin db after execute select. 
151-             $ this select ($ this config ['db ' ]);
152-             $ this database  = null ;
149+         try  {
150+             if  ($ this database  && $ this database  != $ this config ['db ' ]) {
151+                 // Select the origin db after execute select. 
152+                 $ this select ($ this config ['db ' ]);
153+                 $ this database  = null ;
154+             }
155+             parent ::release ();
156+         } catch  (Throwable $ exception
157+             if  ($ this container ->has (StdoutLoggerInterface::class) && $ logger$ this container ->get (StdoutLoggerInterface::class)) {
158+                 $ loggercritical ('Release connection failed, caused by  '  . $ exception
159+             }
153160        }
154-         parent ::release ();
155161    }
156162
157163    public  function  setDatabase (?int  $ databasevoid 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments