ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.94k stars 332 forks source link

Two different exit status may be triggered succesively within the same coedition session #1658

Open raphaelbadawi opened 3 months ago

raphaelbadawi commented 3 months ago

This issue is unique.

Operating System

Linux (RPM package)

Version information

8.1.1

Expected Behavior

Once a coedition session is exited, you cannot exit it again unless you've entered it again in the meantime.

Actual Behavior

There is a specific case involving connection loss where we can have STATUS 2 EXIT SAVE CHANGES and then STATUS 4 EXIT NO CHANGE in a row within the same coedition key. Which can mess up logic happening between OnlyOffice and the document repository.

Reproduction Steps

  1. User A creates a new coedition session. He/she makes some changes, and then loses internet connection. Exit status 2 is triggered. The document repository unlocks the document.
  2. User B creates a new coedition session and makes some changes.
  3. User A recovers internet connection. onVersionOutdated event is fired, the page is refreshed (we trigger a full page reload when onVersionOutdated is fired, to remove the obsolete document.key from the DOM): on refresh the status 4 exit no change is triggered. The last event before with this session key was status 2 exit save changes.

Additional information

No response