docs: def close(self):
          """Close the connection.
  
          This method closes the connection permanently; after it has
          been called, the object is unusable.
          """
          # Without this thread lock, there is a window during which
          # select() can find a closed socket, leading to an EBADF error.
          with self.reactor.mutex:
              self.disconnect("Closing object")
              self.reactor._remove_connection(self)