-
Notifications
You must be signed in to change notification settings - Fork 57
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
zmq4: add option for automatic reconnect #127
Conversation
I tested it for pub and sub sockets: for pub sockets it works fine, for sub socket I have the problem described in #116 |
Codecov Report
@@ Coverage Diff @@
## main #127 +/- ##
==========================================
- Coverage 67.58% 67.58% -0.01%
==========================================
Files 29 29
Lines 1820 1823 +3
==========================================
+ Hits 1230 1232 +2
- Misses 490 491 +1
Partials 100 100
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good.
thanks for the PR.
socket.go
Outdated
onCloseCb = func(c *Conn) { | ||
sck.scheduleRmConn(c) | ||
time.Sleep(sck.retry) | ||
sck.Dial(endpoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calling back into socket.Dial
will start another connReaper
goroutine.
are we sure this is ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, this is a problem. I just added a reaperStarted
bool flag. Do you think this is an ok approach to fix this?
e308511
to
6d219d4
Compare
please rebase off the latest |
d0375cc
to
8903a75
Compare
please rebase off the latest |
a2090eb
to
8b64c23
Compare
No problem, thank you for taking the time to review my PRs! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last remaining nit-picks.
looking good :)
8b64c23
to
978883a
Compare
thx, I applied them |
I have not tested this yet, it's meant as discussion base for #124
Fixes #124