Clear outgoingMessages on last drained subscriber

This commit is contained in:
Alex Hultman
2021-09-28 23:23:00 +02:00
committed by GitHub
parent 182ca20b88
commit 814a7ee53e
+5
View File
@@ -252,6 +252,11 @@ public:
/* This one always resets needsDrainage before it calls any cb's.
* Otherwise we would stackoverflow when sending after publish but before drain. */
drainImpl(s);
/* If we drained last subscriber, also clear outgoingMessages */
if (!drainableSubscribers) {
outgoingMessages.clear();
}
}
}