From 7198cd81e1db3c92f99a7079e7820a6cdc51c40a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 26 Jun 2020 21:46:42 +0200 Subject: Do not do anything when unsubscribing an id that isn't in the subscription list. --- src/munia_proto.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/munia_proto.cc') 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 { -- cgit v1.2.3