Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index the session past correctly when discarding. #14860

Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Index the session past correctly when discarding.

  • Loading branch information
asajeffrey committed Jan 5, 2017
commit 5fd284cf3ac6c874d44abaa7983726fd4fb4e158
@@ -2110,7 +2110,8 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
} else if let Some(frame) = self.frames.get_mut(&frame_change.frame_id) {
debug!("Adding pipeline to existing frame.");
frame.load(frame_change.new_pipeline_id, frame_change.url.clone());
let evicted_id = frame.prev.get_mut(opts::get().max_session_history)
let evicted_id = frame.prev.len().checked_sub(opts::get().max_session_history)
.and_then(|index| frame.prev.get_mut(index))
.and_then(|entry| entry.pipeline_id.take());
(evicted_id, false, true, true)
} else {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.