diff --git a/crates/tor-proto/src/circuit/reactor.rs b/crates/tor-proto/src/circuit/reactor.rs index 5c6c64144..120cbbba7 100644 --- a/crates/tor-proto/src/circuit/reactor.rs +++ b/crates/tor-proto/src/circuit/reactor.rs @@ -1705,7 +1705,11 @@ impl Reactor { .get_mut(Into::::into(hop_num)) .ok_or(Error::CircuitClosed)?; - if !message_closes_stream { + if message_closes_stream { + hop.map.ending_msg_received(stream_id)?; + + return Ok(()); + } else { let begin = msg .decode::() .map_err(|e| Error::from_bytes_err(e, "Invalid Begin message"))?