Clear outgoingMessages on last drained subscriber
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user