From 3deb503477daea5303b5d002bd82401be1a277f4 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 7 Aug 2010 19:00:04 +0100 Subject: mod_bosh: Fix to properly ignore repeated requests --- plugins/mod_bosh.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/mod_bosh.lua') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 1d4d8096..2b95659c 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -288,6 +288,7 @@ function stream_callbacks.streamopened(request, attr) -- 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 @@ function stream_callbacks.streamopened(request, attr) 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 -- cgit v1.2.3