hedgeagent/1.12.0 #1

Open
sa6anw wants to merge 201 commits from hedgeagent/1.12.0 into hedgeagent/1.10.5
2 changed files with 10 additions and 11 deletions
Showing only changes of commit da2c065e59 - Show all commits

View File

@@ -1,4 +1,5 @@
'use strict'
const util = require('util')
// realtime
// external modules
const cookie = require('cookie')
@@ -569,16 +570,13 @@ function disconnect (socket) {
if (note.server.isDirty) {
updateNote(note, function (err, _note) {
if (err) return logger.error('disconnect note failed: ' + err)
// clear server before delete to avoid memory leaks
note.server.document = ''
note.server.operations = []
delete note.server
delete notes[noteId]
if (config.debug) {
logger.debug(notes)
getStatus(function (data) {
logger.debug(JSON.stringify(data))
})
// Check again for online users before clear, because users could reconnect during the async updateNote
if (Object.keys(note.users).length <= 0) {
// clear server before delete to avoid memory leaks
note.server.document = ''
note.server.operations = []
delete note.server
delete notes[noteId]
}
})
} else {
@@ -596,7 +594,7 @@ function disconnect (socket) {
if (disconnectSocketQueue.length > 0) { disconnect(disconnectSocketQueue[0]) }
if (config.debug) {
logger.debug(notes)
logger.debug(util.inspect(notes))
getStatus(function (data) {
logger.debug(JSON.stringify(data))
})

View File

@@ -9,6 +9,7 @@
### Bugfixes
- All links will be opened in new tabs instead of the same tab as the note. This was changed when the external link warning was implemented and now the old behavior is restored.
- Fixed a bug in the realtime disconnect handler that could lead to data-loss of users with a flaky connection
## <i class="fa fa-tag"></i> 1.11.1 <i class="fa fa-calendar-o"></i> 2026-07-24