summaryrefslogtreecommitdiff
path: root/src/munia_proto.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-06-26 21:46:42 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-06-26 21:46:42 +0200
commit7198cd81e1db3c92f99a7079e7820a6cdc51c40a (patch)
tree4621907a1354698bc323ded206de9eddd2cab889 /src/munia_proto.cc
parented9d39d488508894603bca2f134f5c4e5e7c3f80 (diff)
Do not do anything when unsubscribing an id that isn't in the subscription list.
Diffstat (limited to 'src/munia_proto.cc')
-rw-r--r--src/munia_proto.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/munia_proto.cc b/src/munia_proto.cc
index 2230a0a..0508f9f 100644
--- a/src/munia_proto.cc
+++ b/src/munia_proto.cc
@@ -270,7 +270,13 @@ int callback_lws_node(struct lws *wsi,
}
else if(omi->cmd == cmd::unsubscribe)
{
- connection_handler.unsubscribe(wsi, omi->unsubscribe.id);
+ if(!connection_handler.unsubscribe(wsi, omi->unsubscribe.id))
+ {
+ // id wasn't in the subscriptionlist skip
+ omi++;
+ continue;
+ }
+
NodeIdList ids;
try
{