Fix up unsubscribeAll

This commit is contained in:
Alex Hultman
2019-10-07 11:58:02 +02:00
parent d09f25850b
commit 6c7844d65f
6 changed files with 122 additions and 276 deletions
+7
View File
@@ -41,6 +41,9 @@ private:
/* We might have a dedicated compressor */
DeflationStream *deflationStream = nullptr;
/* We could be a subscriber */
Subscriber *subscriber = nullptr;
public:
WebSocketData(bool perMessageDeflate, bool slidingCompression, std::string &&backpressure) : AsyncSocketData<false>(std::move(backpressure)), WebSocketState<true>() {
compressionStatus = perMessageDeflate ? ENABLED : DISABLED;
@@ -55,6 +58,10 @@ public:
if (deflationStream) {
delete deflationStream;
}
if (subscriber) {
delete subscriber;
}
}
};