diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-06-26 21:46:42 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-06-26 21:46:42 +0200 |
commit | 7198cd81e1db3c92f99a7079e7820a6cdc51c40a (patch) | |
tree | 4621907a1354698bc323ded206de9eddd2cab889 /src/munia_proto.cc | |
parent | ed9d39d488508894603bca2f134f5c4e5e7c3f80 (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.cc | 8 |
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 { |