new-session-manager icon indicating copy to clipboard operation
new-session-manager copied to clipboard

nsmd: During load/timeout the session is not set yet and can be quit without any safeguards

Open diovudau opened this issue 4 years ago • 1 comments

AFAIK this is not a regression, but needs testing.

When a session is currently loading and takes very long, for example because the 5 second timeout is waiting for a non-nsm-capable client, during that time you can just Quit and do other commands that should normally check if a session is already open.

Internally the current session is only set after load, including the /nsm/gui/session/name message which indicates "session loaded" to a GUI.

To be fair, this is a corner case, which I only discovered because I was rapidly restarting and quitting during development.

But it could happen when a user loads the wrong session by accident and immediately tries to leave it. So far I don't see any consquences for the user because nothing will be saved here, especially not jackpatch (which would destroy all connectiongs because clients are only partially ready)

In summary: Not critical, but would be nice to fix one day. Be careful of side-effects and regressions.

diovudau avatar Jul 12 '20 17:07 diovudau

Related: during opening a session, when a program reports an error via blocking dialog box (e.g. Carla) before it announced to NSM the session is also waiting without timing out. /nsm/gui/session/name is not received until the blocking application progresses.

Since we have an error-situation here anyway this does not urgent care, however, it is another reason to send the session name before the client list. (If that is compatible with the current API)

diovudau avatar Jul 12 '20 21:07 diovudau