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

Graceful TCP auto-reconnect #1

Open
plutov opened this issue Aug 24, 2016 · 2 comments
Open

Graceful TCP auto-reconnect #1

plutov opened this issue Aug 24, 2016 · 2 comments

Comments

@plutov
Copy link

plutov commented Aug 24, 2016

I am using lentil in production. Sometimes I have EOF error, or connection can be lost for 1 second. After that I should manually reconnect using lentil.Dial and call again Use/Watch. It will be awesome to have it on client side, some kind of re-connection. Btw, I tried to reconnect TCP in lentil, but we still need to call Use/Watch after that, so need a more complex solution.

I will try to provide a PR to fix this issue, also please share your vision on this issue.

@nutrun
Copy link
Owner

nutrun commented Sep 21, 2016

Hi Aliaksandr,

Is something like this what you had in mind? https://github.com/nutrun/lentil/compare/reconnecting

Run https://gist.github.com/nutrun/b51ff332c64821eff9125c6544353ddb and start/stop beanstalkd to see it reconnect after a dropped connection.

This is a rough example only and hasn't been tested at all. We'd have to implement Reconnecting* versions of all the lentil public functions.

@plutov
Copy link
Author

plutov commented Sep 22, 2016

Thanks, it should work!

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

2 participants