Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to turn off auto_reconnect #126

Open
FabioRosado opened this issue Dec 24, 2018 · 0 comments
Open

Unable to turn off auto_reconnect #126

FabioRosado opened this issue Dec 24, 2018 · 0 comments

Comments

@FabioRosado
Copy link

Hello,

I am using this project as a database connector for opsdroid. Today I was working on a bug fix and didn't started my redis server, when I ran opsdroid I have noticed that the auto_connect was being triggered even though the flag was set to False.

The connect method is implemented like this:

    async def connect(self):
        """Connect to the database.

        This method will connect to a Redis database. By default it will
        connect to Redis on localhost on port 6379

        """
        self.client = await asyncio_redis.Connection.create(
            host=self.host,
            port=self.port,
            db=self.database,
            auto_reconnect=self.reconnect,
            password=self.password,
        )

And self.reconnect is set up like self.reconnect = self.config.get("reconnect", False) so I would expect the connection to not reconnect when the bool is set to False, but it doesn't seem to be happening.

I have also tried to set auto_reconnect to False directly but nothing changed.

Not sure if anyone else has the same issue or if something on my end but decided to report it anyway 😄 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant