Tell whether the server is accepting new connections or shutting down.

def is_serving(self) -> bool:
        """
        Tell whether the server is accepting new connections or shutting down.

        """
        try:
            # Python ≥ 3.7
            return self.server.is_serving()  # type: ignore
        except AttributeError:  # pragma: no cover
            # Python < 3.7
            return self.server.sockets is not None