PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | js/heartbeat.js +4 -1 3.6.0 → 4.7.0 View file →
@@ -133,11 +133,14 @@
133 133 * @returns {boolean}
134 134 */
135 135 function do_agents_match(agent1, agent2) {
136 136 var command_matches = agent1.command === agent2.command;
137 + var subaction1 = agent1.command_data && agent1.command_data.subaction ? agent1.command_data.subaction : undefined;
138 + var subaction2 = agent2.command_data && agent2.command_data.subaction ? agent2.command_data.subaction : undefined;
139 + var subaction_matches = subaction1 === subaction2;
137 140 var command_not_sent_yet = false === agent1.sent;
138 141
139 - return command_matches && command_not_sent_yet;
142 + return command_matches && subaction_matches && command_not_sent_yet;
140 143 }
141 144
142 145 /**
143 146 * Add a heartbeat agent that will be sent to backend and has a callback to receive the response