Repository navigation
Conversation
A host such as pi-web runs several Pi sessions in one process. They shared one coordinator and one session manager, so notices went to whichever session bound its API last, and any session's shutdown killed every session's shells and monitors. Keep a coordinator per session id, record which session started each shell, and on shutdown end only that session's shells. The whole-process teardown still runs when the last session leaves. Fixes nicobailon#95
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a host that runs several Pi sessions in one process, such as pi-web, all sessions shared one coordinator and one session manager. Notices went to the session that started last, and one session's shutdown killed every session's shells.
Each Pi session now has its own coordinator, and a shutdown ends only the shells that session started. Single-session behaviour is unchanged. The shell list is still shared, so listing, attaching and dismiss-all still reach other sessions' shells.
New tests in
tests/multi-session-host.test.tsfail onmain. Checked in pi-web: both symptoms reproduce onmainand are gone on this branch.Fixes #95