diff options
Diffstat (limited to 'crates/tor-proto/src/channel/reactor.rs')
| -rw-r--r-- | crates/tor-proto/src/channel/reactor.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/tor-proto/src/channel/reactor.rs b/crates/tor-proto/src/channel/reactor.rs index 2e8dd2837..98e1859aa 100644 --- a/crates/tor-proto/src/channel/reactor.rs +++ b/crates/tor-proto/src/channel/reactor.rs @@ -846,7 +846,14 @@ impl<R: Runtime> Reactor<R> { /// Called when a circuit goes away: sends a DESTROY cell and removes /// the circuit. + /// + /// No-op if the circuit has already gone away, + /// (for example if we have already received DESTROY). async fn outbound_destroy_circ(&mut self, id: CircId) -> Result<()> { + if !self.circs.is_open(id) { + return Ok(()); + } + trace!(channel_id = %self, "Circuit {} is gone; sending DESTROY", id); // Remove the circuit's entry from the map: nothing more // can be done with it. |
