-
Notifications
You must be signed in to change notification settings - Fork 11
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
🙉 Enable NACKs behind a feature toggle #127
Conversation
f938884
to
f694215
Compare
I'm a bit torn how far to go with adding tests to this PR, I think to really make the logic testable it should be pulled into more specialized buffer/nack tracking classes. Maybe before merging I should add at least one happy path test of relaying packets, and then as we refactor this we can add more tests. |
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.
Couple nits, then good to merge :)
src/FtlServer.h
Outdated
@@ -66,7 +66,7 @@ class FtlServer : public FtlControlConnectionManager | |||
/** | |||
* @brief Starts listening for FTL connections on a new thread. | |||
*/ | |||
void StartAsync(); | |||
void StartAsync(bool nackLostPackets); |
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.
Any reason nackLostPackets
can't be a constructor parameter?
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.
Yeah it is weird. The issue is FtlServer is constructed before configuration is loaded in Init
.
https://github.com/Glimesh/janus-ftl-plugin/blob/master/src/JanusFtl.cpp#L40
We could just move construction of the FtlServer into Init? I think that makes sense, though I'd also then move the control listener construction Init.
Edit: Did that, seems like an improvement
Meant to be a minimal set of changes to bring back the NACK. Further refactoring can come later.
Tested on the homelab without/with feature enabled. Enabling this makes a substantial improvement in all the simulated packet loss scenarios I've done.
Fixes #95