The default behavior for connections is to attempt auto reconnection when an unexpected close occurs.
For connection factories that shutdown thread pools, like DefaultConnectionFactory, auto reconnect will fail because the thread pool is closed.
This doesn't tend to matter since DefaultConnectionFactory closes the connection when the operation is complete, so connections are short lived.
Add a check to prevent auto reconnect in this scenario.
The default behavior for connections is to attempt auto reconnection when an unexpected close occurs. For connection factories that shutdown thread pools, like DefaultConnectionFactory, auto reconnect will fail because the thread pool is closed. This doesn't tend to matter since DefaultConnectionFactory closes the connection when the operation is complete, so connections are short lived.
Add a check to prevent auto reconnect in this scenario.