hedgedoc/public
Julian Rother 2eb4c8e05f Fix premature note cleanup on error
Connection forbidden errors cause cleanup of note state without first
checking if other clients are still connected to the note. This leads
to inconsistent pad content and changes not being saved properly.

This change reverts parts of 725e982 (Fix realtime on forbidden not clean
up properly ...). The call to `interruptConnection()` on permission errors
is redundant, since `failConnection()` and `disconnect()` already perform
all required cleanup in this case. The other call to `interruptConnection()`
only happens when a client (the first client for a note) disconnects while
the note is being loaded from the database. It is refactored for clarity.

Fixes #3894

Co-authored-by: David Mehren <git@herrmehren.de>
Signed-off-by: Julian Rother <julian@jrother.eu>
2023-05-28 16:10:51 +02:00
..
banner Replace CodiMD with HedgeDoc 2020-11-14 21:18:36 +01:00
css Ignore local installed fonts 2021-08-18 22:47:22 +02:00
docs Fix premature note cleanup on error 2023-05-28 16:10:51 +02:00
fonts Remove uesless executable permission for static files 2016-11-14 21:13:02 +08:00
icons apply review suggestions 2020-11-15 20:12:39 +01:00
js feat: use codemirror precompiled package 2023-02-28 09:25:43 +01:00
uploads upload image to public/uploads 2016-11-14 16:45:57 +08:00
vendor Fix missing inline authorship colors 2022-04-08 12:13:37 +02:00
views Add dark mode toggle in mobile view 2022-08-22 08:52:49 +02:00
.eslintrc.js Fix missing inline authorship colors 2022-04-08 12:13:37 +02:00
default.md Removed unused note and set empty on default note, updated features note 2016-01-17 09:57:25 -06:00
screenshot.png Updated screenshot 2020-11-17 11:13:58 +01:00