UnreadyService
ignores dropped cancel handles
#3130
Labels
Milestone
UnreadyService
ignores dropped cancel handles
#3130
Motivation
The
UnreadyService
allows the request in flight to be cancelled through aoneshot
channel. However, if the cancel handle (theoneshot::Sender
endpoint) is dropped, the request isn't cancelled. This can lead to bugs and requests being kept executing when they should have been cancelled.Alternatives
It might make sense to replace the "cancel handle" with some sort of
LiveGuard
type, that automatically signals that the request should be cancelled in itsDrop
implementation.We could also check for
Err(Canceled)
in the existing code:zebra/zebra-network/src/peer_set/unready_service.rs
Line 40 in b1acdc6
Related Work
Teor uncovered this issue while reviewing #3108.
The text was updated successfully, but these errors were encountered: