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

fix: Use Close_Session post message to properly end the Collabora editing before opening locally #3601

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Apr 15, 2024

Forward port of #3597

If we edit locally we want to ensure that the document is saved and all sessions are removed before handing over the file to the desktop client. The previous approach was somewhat flaky and could lead to opening the file locally too early. The Close_Session post message will ensure that the file is properly terminated on the Collabora side and the lock on it is removed.

Further we can use the Session_Closed post message on other editing sessions to show a hint to the user why the document was auto-closed.

Steps to reproduce (with some back luck in timing):

  1. Open a document in Collabora in multiple browser tabs
  2. One tab clicks the open locally button so that the desktop client will take over editing

Now before this change there was a high chance that if the save and termination of individual sessions took longer, Collabora hadn't fully closed the document and may have ended in a inconsistent state (either the client failed to lock or Collabora hasn't finished writing the document). With the new post message handling the Collabora side should be fully terminated before we handover.

@juliusknorr juliusknorr added bug Something isn't working 3. to review Ready to be reviewed labels Apr 15, 2024
@juliusknorr
Copy link
Member Author

/backport! to stable27

@juliusknorr
Copy link
Member Author

/backport to stable29

@juliusknorr
Copy link
Member Author

/backport to stable28

Copy link
Contributor

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a typo that should have no effect as it's consistent. Other than that seems good.

@juliusknorr juliusknorr self-assigned this Apr 16, 2024
…ting before opening locally

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Ready to be reviewed bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants