Check to make sure that we don't close a closed connection