mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-03-27 01:15:00 +08:00
This is a tad complicated. The underlying sorted list implementation expects the sort key to be stable for the lifetime of the object. However, if we sort by size, for instance, the sort order changes as the flow progresses through its lifecycle. We address this through two means: - Let order keys cache the sort value by flow ID. - Add a facility to refresh items in the list by removing and re-adding them when they are updated.