consul: don't close a nil connection