Diff

plugins/mod_bosh.lua @ 3450:4bd78a5fee75

mod_bosh: Fix to properly ignore repeated requests
author Matthew Wild <mwild1@gmail.com>
date Sat, 07 Aug 2010 19:00:04 +0100
parent 3449:0a74ce129a06
child 3460:742f6e5a4066
line wrap: on
line diff
--- a/plugins/mod_bosh.lua	Fri Aug 06 02:00:12 2010 +0100
+++ b/plugins/mod_bosh.lua	Sat Aug 07 19:00:04 2010 +0100
@@ -288,6 +288,7 @@
 			-- Repeated, ignore
 			session.log("debug", "rid repeated (on request %s), ignoring: %s (diff %d)", request.id, session.rid, diff);
 			request.notopen = nil;
+			request.ignore = true;
 			request.sid = sid;
 			t_insert(session.requests, request);
 			return;
@@ -316,6 +317,7 @@
 end
 
 function stream_callbacks.handlestanza(request, stanza)
+	if request.ignore then return; end
 	log("debug", "BOSH stanza received: %s\n", stanza:top_tag());
 	local session = sessions[request.sid];
 	if session then