code: async def close(self) -> None:
          
          self.stream.close()
          # Block until the serving loop is done, but ignore any exceptions
          # (start_serving is already responsible for logging them).
          assert self._serving_future is not None
          try:
              await self._serving_future
          except Exception:
              pass
docs: Closes the connection.
  
          Returns a `.Future` that resolves after the serving loop has exited.