fix: ensure liveupdate pubsubs exit (#5557)
Previously, the derived class (i.e. BttvLiveUpdates or SeventvEventAPI)
would have their destructor ran before BasicPubSubManager called
stop, meaning there was a time wherein messages could still flow
through, attempting to call `onMessage` on a pure virtual, causing a
crash.
This commit is contained in:
@@ -15,6 +15,11 @@ BttvLiveUpdates::BttvLiveUpdates(QString host)
|
||||
{
|
||||
}
|
||||
|
||||
BttvLiveUpdates::~BttvLiveUpdates()
|
||||
{
|
||||
this->stop();
|
||||
}
|
||||
|
||||
void BttvLiveUpdates::joinChannel(const QString &channelID,
|
||||
const QString &userName)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ class BttvLiveUpdates : public BasicPubSubManager<BttvLiveUpdateSubscription>
|
||||
|
||||
public:
|
||||
BttvLiveUpdates(QString host);
|
||||
~BttvLiveUpdates() override;
|
||||
|
||||
struct {
|
||||
Signal<BttvLiveUpdateEmoteUpdateAddMessage> emoteAdded;
|
||||
|
||||
Reference in New Issue
Block a user