Fix connection closing (so as to not force a re-open)