Skip to content
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

Implement automatic transfer cancelation #337

Merged

Conversation

matszczygiel
Copy link
Contributor

@matszczygiel matszczygiel commented Jul 10, 2024

This PR adds the automatic cancelation feature. This is done by checking on each file reaching any terminal state to see if there's any file not yet in the terminal state. If there isn't, the transfer is automatically canceled by the peer who receives the notification about the file state change.
Additionally, I've implemented a check upon establishing the connection to see if the transfer should be canceled based on file states to account for transfers created by old libdrop versions and to be double sure the mechanism works.

@matszczygiel matszczygiel force-pushed the msz/FILE-534-implement-automatic-transfer-cancellation branch 8 times, most recently from 191e2b9 to edf3f39 Compare July 11, 2024 09:27
@matszczygiel matszczygiel marked this pull request as ready for review July 11, 2024 09:27
@matszczygiel matszczygiel requested a review from a team as a code owner July 11, 2024 09:27
@matszczygiel matszczygiel force-pushed the msz/FILE-534-implement-automatic-transfer-cancellation branch 3 times, most recently from 4c8b4b2 to 2dd55b6 Compare July 11, 2024 13:11
Lipt0nas
Lipt0nas previously approved these changes Jul 15, 2024
drop-transfer/src/manager.rs Outdated Show resolved Hide resolved
drop-transfer/examples/udrop.rs Show resolved Hide resolved
@matszczygiel matszczygiel force-pushed the msz/FILE-534-implement-automatic-transfer-cancellation branch from 2dd55b6 to 5e75db1 Compare July 15, 2024 07:07
Signed-off-by: Mateusz Szczygieł <[email protected]>
Signed-off-by: Mateusz Szczygieł <[email protected]>
@matszczygiel matszczygiel force-pushed the msz/FILE-534-implement-automatic-transfer-cancellation branch from 5e75db1 to c6deb3f Compare July 15, 2024 07:09
@matszczygiel matszczygiel merged commit 630126f into main Jul 15, 2024
7 checks passed
@matszczygiel matszczygiel deleted the msz/FILE-534-implement-automatic-transfer-cancellation branch July 15, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants