File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -693,19 +693,14 @@ private void performHealthCheck() {
693693 pconn .addConnectionEventListener (poolConnectionEventListener );
694694
695695 if (validateConnection (pconn )) {
696- // Create and wrap connection for warm-up
697- java . sql . Connection rawConn = pconn . getConnection ();
696+ // Create unopened wrapper for warm-up
697+ // The wrapper will be opened when first acquired from the pool
698698 Connection connection = new Connection ();
699- connection .open (rawConn , database );
700-
701- // Store the wrapper (but don't add to recycled yet - it's active)
702699 PooledConnectionWrapper w = new PooledConnectionWrapper (connection , pconn );
703700 connectionWrappers .put (pconn , w );
704701
705- // Close the connection to recycle it
706- // This will trigger connectionClosed event which calls recycleConnection()
707- // recycleConnection() will add it to the recycled queue
708- rawConn .close ();
702+ // Add directly to recycled queue (skip the active state for warm-up)
703+ recycledConnections .offer (w );
709704
710705 currentRecycled ++;
711706 total = currentActive + currentRecycled ;
You can’t perform that action at this time.
0 commit comments