Close local db connection when closing.