summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan <alan@boum.org>2015-09-10 23:08:53 +0000
committerAlan <alan@boum.org>2015-09-10 23:08:53 +0000
commit5e1a10cfedc1faf0de1acbdeaf74d97702266180 (patch)
tree543614f85297e11987a438211b5975cfcc971b14
parenteb4d2b0e259dd44d24a148da9474bfc73c2c166b (diff)
Fix: actually compare the new circuit ID with a circuit ID
We used to compare the new circuit ID with the old stream ID, which obviously was always false.
-rwxr-xr-xtormonitor5
1 files changed, 3 insertions, 2 deletions
diff --git a/tormonitor b/tormonitor
index 5944a1d..ffc2ee3 100755
--- a/tormonitor
+++ b/tormonitor
@@ -414,8 +414,9 @@ class TorMonitorWindow(Gtk.ApplicationWindow):
:var stem.response.events.StreamEvent stream: the stream
"""
stream_iter = self._stream_to_iter[stream.id]
- if stream.circ_id != self._treestore.get_value(stream_iter, 1):
- # The stream doesn't belong its parent circuit anymore. Remove it.
+ circuit_iter = self._treestore.iter_parent(stream_iter)
+ if stream.circ_id != self._treestore.get_value(circuit_iter, 1):
+ # The stream doesn't belong to its parent circuit anymore. Remove it.
self.remove_stream(stream)
if stream.circ_id:
# The stream has a new circuit, add it with its new parent.