Terminate server if no more connection exists.

async def terminate(self) -> None:
        """Terminate server if no more connection exists."""
        await asyncio.sleep(config.shutdown_wait)
        # stop server and close loop if no more connection exists
        if not is_connected():
            stop_server(self.application.server)
            self.application.loop.stop()