-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix notifier #8
base: main
Are you sure you want to change the base?
fix notifier #8
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
==========================================
+ Coverage 91.74% 92.03% +0.28%
==========================================
Files 9 9
Lines 933 929 -4
==========================================
- Hits 856 855 -1
+ Misses 77 74 -3 ☔ View full report in Codecov by Sentry. |
il try and figure out how to remove this extra 'notify_one()' i put in for the test as it's not that clean |
It looks like you are right here, we should be using Also, generally speaking, I think this is good thing you are looking into. We might be able to completely do away with notifiers to close connections if there is an error downstream. TBH, that will be a much cleaner solution. I am writing some networking code for frost-federation and I have been able to avoid notifiers there, instead, I return Error back upstream and the connection then cleans up after itself on an downstream errors. I haven't wrapped up all the tests there, so maybe notifiers will come back. |
I removed the extra I also had to use the addr |
I haven't come across using notifiers before, but i don't have much experience in network code, it doesn't seem like its being used for errors here though, its just used to reset the |
i wanted to understand how this notifier worked just in case the extra one i added for the tests would cause problems with the heartbeat function, and it looks like the wrong notifier is set in
start_message_handler
, its not actually doing anything.I updated it to use
notifier.notify_one();
Is this purpose of this to stop the heartbeat if a message has already been handled to reduce the amount of messages being sent?