mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-23 01:55:07 +02:00
The check was dropped during the yhub migration, on the grounds that `reset_connections` was a no-op. It is not one any more: the backend calls yhub's reset-connections route, which re-runs the authorization of each connection and closes the sockets whose access is no longer the one they were opened with, with the code 4401. The old check cannot come back as it was. It had the author of the document change its visibility and waited for the author's own socket to close, which is what the collaboration server used to do - close every connection to the document, whatever it was that changed. yhub leaves alone the connections that are unaffected, and an owner's access is the same before and after, so the author's socket is now deliberately kept. The client to watch is therefore another one: the anonymous reader holding the public link, while the author switches that link from reading to editing. Their socket goes down and the client comes back on its own. That the new connection is live is asserted by what flows through it rather than by the socket being open - the author writes after the change and the text reaches the reader, with nothing reloaded in between. Signed-off-by: Kevin Jahns <kevin.jahns@protonmail.com>