Changeset

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
parents 3449:0a74ce129a06
children 3451:6402a9defcdc
files plugins/mod_bosh.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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