Fix #7340 by correclty computing function name for push event (#7341)

* Add a failing test for issue #7340

If any delay occurs after "message.event" assignation in
LiveQueryServer._onAfterSave, the next subscription or request with a different
event might overwrite it, and by that using the wrong "push" function name.

* Remove updade of message and use res.event instead

This prevent computing function name from a
incorrect event if multiple subscriptions override
one by one the message.event.

* Update CHANGELOG.md

* Replace setTimeout by async/await expressions
This commit is contained in:
Perceval Archimbaud
2021-04-13 23:47:14 +02:00
committed by GitHub
parent 45d00cee60
commit 87dcd23b6a
4 changed files with 137 additions and 66 deletions

View File

@@ -515,3 +515,5 @@ jasmine.restoreLibrary = function (library, name) {
}
require(library)[name] = libraryCache[library][name];
};
jasmine.timeout = t => new Promise(resolve => setTimeout(resolve, t));