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

为什么每次在设置代理或者移除代理的时候都要设置一次redis对象 #8

Open
limbo-envoy opened this issue Dec 4, 2019 · 0 comments

Comments

@limbo-envoy
Copy link

image
这个 set_proxy方法每次调用都会创建一个self.redis = RedisClient()对象,为什么不能在创建class Sender()的时候就初始化这个对象呢?
而且这里很奇怪的一点是我用在创建Sender初始化self.redis后,调用set_proxy时候,即在self.redis.set(CLIENT_NAME, proxy)时候程序会卡死不动,按下Crtl+C后程序才能继续执行,哦,这种情况只在连接外网redis的时候才会出现,在连接局域网redis的时候不会有,我很奇怪,请问您当时这么写是有什么原因吗?

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