public void preExecute ( ) throws SQLException { lastQueryNanos = System . nanoTime ( ) ; //if connection is closed or failed on slave if ( this . currentProtocol != null && this . currentProtocol . isClosed ( ) ) { preAutoReconnect ( ) ; } }
Before executing query reconnect if connection is closed and autoReconnect option is set .