code: def connection_made(self, transport: asyncio.BaseTransport) -> None:
          
          super().connection_made(transport)
          # Register the connection with the server before creating the handler
          # task. Registering at the beginning of the handler coroutine would
          # create a race condition between the creation of the task, which
          # schedules its execution, and the moment the handler starts running.
          self.ws_server.register(self)
          self.handler_task = self.loop.create_task(self.handler())
docs: Register connection and initialize a task to handle it.