Description
The trait method interval() in HttpTracker (line 264-266 of crates/libtortillas/src/tracker/http.rs) currently calls self.interval(), which causes infinite recursion and will result in a stack overflow at runtime.
Location
- File:
crates/libtortillas/src/tracker/http.rs
- Lines: 264-266
Current Code
fn interval(&self) -> usize {
self.interval()
}
Suggested Fix
Replace the recursive call with a direct read of the atomic value:
fn interval(&self) -> usize {
self.interval.load(Ordering::Acquire)
}
Context
This issue was identified during review of PR #172 and is considered out of scope for that PR.
References
Additional Notes
This is a good first issue for contributors new to the codebase as it involves a straightforward fix with a clear solution.
Description
The trait method
interval()inHttpTracker(line 264-266 ofcrates/libtortillas/src/tracker/http.rs) currently callsself.interval(), which causes infinite recursion and will result in a stack overflow at runtime.Location
crates/libtortillas/src/tracker/http.rsCurrent Code
Suggested Fix
Replace the recursive call with a direct read of the atomic value:
Context
This issue was identified during review of PR #172 and is considered out of scope for that PR.
References
Stoppedmessage whenTorrentActorstops #172Stoppedmessage whenTorrentActorstops #172 (comment)Additional Notes
This is a good first issue for contributors new to the codebase as it involves a straightforward fix with a clear solution.