Repository navigation
Networking: Drop a closed sender's asset receivers - #328
Conversation
AssetFileTransfer overrode OnClosedConnection without calling FileListTransfer's, so a dropped connection never removed its receivers: they and their handlers lived on until the peer shut down. The override now runs the base first.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Walkthrough
ChangesAsset transfer cleanup
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
Part of #315 (the "Related" item).
AssetFileTransfer::OnClosedConnectionoverrodeFileListTransfer::OnClosedConnectionwithout calling it. When a connection dropped,RemoveReceiver()never ran, so the receivers and their handlers stayed alive untilShutdown()cleared them. Its callback is never set, so the override's only effect was to block that cleanup. It now calls the base first.Tests
New
asset_transfermodule: a receiver set up for a sender is dropped and dereferenced once when that sender's connection closes, and other senders' receivers are kept. The first test fails without the fix. FrameworkTests: 662/662.The crash in #315 itself is fixed in MafiaNet (MafiaHub/MafiaNet#73) and reaches the Framework with the next MafiaNet pin bump.
Summary by CodeRabbit