diff --git a/cassandra/io/asyncioreactor.py b/cassandra/io/asyncioreactor.py index 4876b5be1e..4cf3f16d40 100644 --- a/cassandra/io/asyncioreactor.py +++ b/cassandra/io/asyncioreactor.py @@ -87,6 +87,7 @@ class AsyncioConnection(Connection): def __init__(self, *args, **kwargs): Connection.__init__(self, *args, **kwargs) + self._background_tasks = set() self._connect_socket() self._socket.setblocking(0) @@ -106,7 +107,7 @@ def __init__(self, *args, **kwargs): ) self._send_options_message() - self._background_tasks = set() + @classmethod def initialize_reactor(cls):