Don't fail on clearing nonexistant timeouts

This commit is contained in:
Manish Goregaokar 2014-06-13 05:48:47 +05:30
parent 897e39dcf3
commit e21faaaba7

View file

@ -61,7 +61,7 @@ impl Hash for TimerId {
impl TimerHandle {
fn cancel(&mut self) {
self.cancel_chan.as_ref().map(|chan| chan.send(()));
self.cancel_chan.as_ref().map(|chan| chan.send_opt(()).ok());
}
}