Properly unsubscribe from everywhere on close

This commit is contained in:
Alex Hultman
2019-02-09 09:29:29 +01:00
parent 6fe717f46a
commit 3fe7964e74
3 changed files with 37 additions and 6 deletions
+3
View File
@@ -246,6 +246,9 @@ private:
if (webSocketContextData->closeHandler) {
webSocketContextData->closeHandler((WebSocket<SSL, true> *) s, 1006, {});
}
/* Make sure to unsubscribe from any pub/sub node at exit */
webSocketContextData->topicTree.unsubscribeAll(s);
}
/* Destruct in-placed data struct */