Fix max listener warning from livequery server (#7083)
* fix max listner warning * fix * Clean test log
This commit is contained in:
@@ -46,6 +46,10 @@ function createPublisher(): any {
|
||||
}
|
||||
|
||||
function createSubscriber(): any {
|
||||
// createSubscriber is called once at live query server start
|
||||
// to avoid max listeners warning, we should clean up the event emitter
|
||||
// each time this function is called
|
||||
emitter.removeAllListeners();
|
||||
return new Subscriber(emitter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user