mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[feature] Stop saving changes if connection is closed
This commit is contained in:
@ -2841,6 +2841,11 @@ exports.install = function(server, callbackFunction) {
|
||||
|
||||
let puckerIndex = yield* getChangesIndex(ctx, docId);
|
||||
|
||||
if (constants.CONN_CLOSED === conn.conn.readyState) {
|
||||
//closing could happen during async action
|
||||
return;
|
||||
}
|
||||
|
||||
let deleteIndex = -1;
|
||||
if (data.startSaveChanges && null != data.deleteIndex) {
|
||||
deleteIndex = data.deleteIndex;
|
||||
@ -2855,6 +2860,11 @@ exports.install = function(server, callbackFunction) {
|
||||
}
|
||||
}
|
||||
|
||||
if (constants.CONN_CLOSED === conn.conn.readyState) {
|
||||
//closing could happen during async action
|
||||
return;
|
||||
}
|
||||
|
||||
// Стартовый индекс изменения при добавлении
|
||||
const startIndex = puckerIndex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user