Retry if the database connection was closed