mod_pep_plus: Skip getting PEP service instance for sessions that have not touched PEP
authorKim Alvefur <zash@zash.se>
Wed, 11 Apr 2018 15:52:13 +0200
changeset 8756 d6373a378b73
parent 8755 8f2da579a790
child 8757 ca40f9a5751a
mod_pep_plus: Skip getting PEP service instance for sessions that have not touched PEP
plugins/mod_pep_plus.lua
--- a/plugins/mod_pep_plus.lua	Wed Apr 11 13:24:37 2018 +0100
+++ b/plugins/mod_pep_plus.lua	Wed Apr 11 15:52:13 2018 +0200
@@ -268,7 +268,6 @@
 end
 
 local function update_subscriptions(recipient, service_name, nodes)
-	local service = get_pep_service(service_name);
 	nodes = nodes or empty_set;
 
 	local service_recipients = recipients[service_name];
@@ -286,6 +285,7 @@
 		return;
 	end
 
+	local service = get_pep_service(service_name);
 	for node in current - nodes do
 		service:remove_subscription(node, recipient, recipient);
 	end